I think above code doesn't meet OP's output, because OP wants to transpose the columns to rows. Other had above code will only change number of columns to 4.
Please use code tags as per forum rules for commands/codes/Inputs which you are using into your posts, could you please try following and let me know
if this could help(I haven't tested though).
awk '{!A[$1];!B[$2];!C[$3];}END{for(i in A){Q=Q?Q OFS i:i};for(j in B){U=U?U OFS j:j};for(k in C){V=V?V OFS k:k};print Q ORS U ORS V}' Input_file