for(P=readline(D=[i=j=0]);c=P[i];i++)v=D[j],c<'-'?D[j]=-~v:c<'.'?D[j]--:c<'<'?putstr(<>&#{v};):c>'>'?c<']'?p=i:i=v?p:i:j+=c<'>'?-1:1