More robust version of print.list.pairs