BEGIN{FS="$"}1>A[$1]*=v="0x"$2{A[B[++i]=$1]=v}END{for(;v=A[k=B[++j]];)printf k"$%"(v>m=8^8)".x%x\n",v/m,v%m}