solve digit-doublets