took another stab at code golfing today's aoc in python. Probably could go further with this one if I spent more time on it. 213 characters
s=[[]for i in[0]*9]
for l in open(0):
if l[i:=0]!='m':
for c in l:
if'@'<c<'[':s[i//4][0:0]=c
i+=1
else:n,f,d=map(int,l.split()[1::2]);s[d-1]+=s[f-1][-n:];del s[f-1][-n:]
print(*[x[-1]for x in s],sep='')