President Berland vast officeroom apart work subordinate each subordinate President desk unique colour each desk rectangular side parallel office wall one day President decide establish assembly deputy member unfortunately remember exact deputy remember desk deputy adjacent desk desk president deputy common positive lengththe officeroom plan view matrix n row m column each cell matrix contain desk an uppercase latin letter stand desk colour the period character stand cell