#!/usr/bin/perl -w

use strict;

binmode STDIN;
binmode STDOUT;

my @table = (0x20ac, 0x81, 0x201a, 0x192, 0x201e, 0x2026, 0x2020, 0x2021,
             0x2c6, 0x2030, 0x160, 0x2039, 0x152, 0x8d, 0x17d, 0x8f,
             0x90, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
             0x2dc, 0x2122, 0x161, 0x203a, 0x153, 0x9d, 0x17e, 0x178);

my ($c, $x);

while (read(STDIN, $c, 1) == 1)
{
    $x = ord($c);
    if ($x >= 0x80 && $x <= 0x9f)
    {
        $x = $table[$x - 0x80];
    }
    print chr($x/256).chr($x%256);
}
