dainty diners / catalan problem