#include <iostream>
#include <sstream>
#include <ios>
#include <iomanip>
#include <string>
int main()
{
unsigned char buf[] = { 0xAA, 0xD1, 0x09, 0x01, 0x10, 0xF1 };
std::ostringstream s;
s << std::hex << std::setfill('0') << std::uppercase
<< std::setw(2) << static_cast<int>(buf[0]) << ':'
<< std::setw(2) << static_cast<int>(buf[1]) << ':'
<< std::setw(2) << static_cast<int>(buf[2]) << ':'
<< std::setw(2) << static_cast<int>(buf[3]) << ':'
<< std::setw(2) << static_cast<int>(buf[4]) << ':'
<< std::setw(2) << static_cast<int>(buf[5]);
std::cout << "[" << s.str() << "]\n";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPGlvcz4KI2luY2x1ZGUgPGlvbWFuaXA+CiNpbmNsdWRlIDxzdHJpbmc+CgppbnQgbWFpbigpICAKewogICAgdW5zaWduZWQgY2hhciBidWZbXSA9IHsgMHhBQSwgMHhEMSwgMHgwOSwgMHgwMSwgMHgxMCwgMHhGMSB9OwoKICAgIHN0ZDo6b3N0cmluZ3N0cmVhbSBzOwogICAgcyA8PCBzdGQ6OmhleCA8PCBzdGQ6OnNldGZpbGwoJzAnKSA8PCBzdGQ6OnVwcGVyY2FzZQogICAgICA8PCBzdGQ6OnNldHcoMikgPDwgc3RhdGljX2Nhc3Q8aW50PihidWZbMF0pIDw8ICc6JwogICAgICA8PCBzdGQ6OnNldHcoMikgPDwgc3RhdGljX2Nhc3Q8aW50PihidWZbMV0pIDw8ICc6JwogICAgICA8PCBzdGQ6OnNldHcoMikgPDwgc3RhdGljX2Nhc3Q8aW50PihidWZbMl0pIDw8ICc6JwogICAgICA8PCBzdGQ6OnNldHcoMikgPDwgc3RhdGljX2Nhc3Q8aW50PihidWZbM10pIDw8ICc6JwogICAgICA8PCBzdGQ6OnNldHcoMikgPDwgc3RhdGljX2Nhc3Q8aW50PihidWZbNF0pIDw8ICc6JwogICAgICA8PCBzdGQ6OnNldHcoMikgPDwgc3RhdGljX2Nhc3Q8aW50PihidWZbNV0pOwoKICAgIHN0ZDo6Y291dCA8PCAiWyIgPDwgcy5zdHIoKSA8PCAiXVxuIjsKCiAgICByZXR1cm4gMDsKfQo=