\newtoks\tabjoin
\def\quark{\quark}
\def\tabA{27:Jonah,18:Alan,28:Glory,18:Popeye,28:Alan}
\def\tabB{Jonah:Whales,Jonah:Spiders,Alan:Ghosts,Alan:Zombies,Glory:Buffy}
\def\mergejoin{\tabjoin{}\expandafter\mergejoini\tabA,\quark:\quark,}
\def\mergejoini#1:#2,{%
	\ifx\quark#1\the\tabjoin
	\else
		\def\mergejoinii##1,#2:##2,{%
			\ifx\quark##2\else
				\tabjoin\expandafter{\the\tabjoin#1 : #2 : ##2\par}%
				\expandafter\mergejoinii\expandafter,%
			\fi
		}%
		\expandafter\mergejoinii\expandafter,\tabB,#2:\quark,%
		\expandafter\mergejoini
	\fi
}
\mergejoin
\bye
