#!/usr/local/bin/perl

select(STDOUT); $| =1;        # make STDOUT and STDIN unbuffered
select(STDIN);  $| =1;

while(<DATA>){                # load the dictionary from DATA
   ($a,$b) = split(" ");
   $dict{$a}=$b; }

while (<>){ chop ;

   if(defined($dict{$_})){ print STDOUT "$dict{$_}\n";}
   else                  { print STDOUT "?\n";} }

__DATA__
xxx (a b c d)
ela she
é is
uma a
simpatica nice
rapariga girl
gato cat
eu I
muito very
sou am
valente brave
