#!/usr/bin/perl

#
# 6to4
#

use strict;

foreach my $IPv4 (@ARGV) {
	if ($IPv4 =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) {
		my(@d) = split(/\./, $IPv4);
		printf("2002:%02x%02x:%02x%02x:0:0:0:0:0\n", $d[0], $d[1], $d[2], $d[3]);
	}
}
