#!/n/mynah/home/dreeves/bin/mash
(* Takes a nested list eg {Plus, 2, 2} on stdin and outputs eg Plus[2,2] *)

str = StringJoin@@readList[];
sexp = ToExpression[str];
mexp = ReleaseHold[Hold@@{sexp} //. {{f_, args___} -> f[args]}];

pout[InputForm[mexp]];

