main=interact$take 199.f.map read.reverse.words f(a:b:_)=last(show$a+b):' ':f[a+b,a]