binmode STDIN,':utf8'; binmode STDOUT,':utf8'; $s=<>;chomp $s; print join("", reverse split//,$s),$/;