#!/usr/bin/perl -w

# Exercicio 1 da Aula 25 de MAC211, tal qual resolvido em sala de aula.
# M.S.Reis, 11.6.2010

use strict;

my (@array1, @array2);
my $i = 0;

while(<STDIN>){
  chomp $_;
  $array1[$i] = $_;
  $i++;
}

$i--;

@array2 = reverse @array1;

print "$array2[$_] " foreach 0..$i;
print "\n";
