#!/usr/local/bin/perl -w

use strict;

my ($line);

foreach $line (<>) {
  chomp $line;
  # LATIN SMALL LETTER A WITH OGONEK
  $line =~ s%{\\k\sa}%&#261;%g;
  # LATIN SMALL LETTER E WITH OGONEK
  $line =~ s%{\\k\se}%&#281;%g;
  # LATIN SMALL LETTER Z WITH DOT ABOVE
  $line =~ s%\\\.z%&#380;%g;
  # LATIN SMALL LETTER L WITH STROKE
  $line =~ s%{\\l}%&#322;%g;
  # LATIN SMALL LETTER N WITH ACUTE
  $line =~ s%\\\'n%&#324;%g;
  # LATIN SMALL LETTER C WITH ACUTE
  $line =~ s%\\\'c%&#324;%g;
  # LATIN SMALL LETTER S WITH ACUTE
  $line =~ s%\\\'s%&#347;%g;
  # LATIN SMALL LETTER O WITH ACUTE
  $line =~ s%\\\'o%&#243;%g;
  # LATIN SMALL LETTER C WITH ACUTE
  $line =~ s%\\'{c}%&#x107;%g;
  # LATIN SMALL LETTER C WITH ACUTE
  $line =~ s%\\'{s}%&#x15B;%g;
  # LATIN SMALL LETTER L WITH STROKE 
  $line =~ s%\\l{}%&#x142;%g;
  # LATIN SMALL LETTER N with acute 
  $line =~ s%\\'{n}%&#x144;%g;
  print "$line\n";
}
