#!/usr/bin/env python

#	real*8 aa(72,46,9,11),day
#	real*4 pad
#	real*4 bb(72,46,9,11),dayb
#	integer rec_init
#	rec_init = (72*46*9*11+1)*8+8
#	open(1,file='Jul1.alfa',status='old',form='unformatted',
#	$          access='direct',recl=rec_init)
#	read(1,rec=1) pad,day,aa,pad

import sys

def reverse(s):
	r=''
	for i in range(len(s)-1,-1,-1):
		r += s[i]
	return r


# read pad real*4
pad = sys.stdin.read(4)
sys.stdout.write(reverse(pad))

# read day real*8
day = sys.stdin.read(8)
sys.stdout.write(reverse(day))

# read aa real*8 but there are 327888 of them in an array.  It's a 4
# dimensional array, but I gather that fortran is supposed to lay out arrays
# consistently in memory, cross-platform
for aaind in xrange(327888):
	aaval = sys.stdin.read(8)
	sys.stdout.write(reverse(aaval))
	sys.stderr.write('aa element %d\r' % aaind)

sys.stderr.write('\n')
	
# read pad real*4
pad = sys.stdin.read(4)
sys.stdout.write(reverse(pad))

