table: [['rank', 'nation', 'gold', 'silver', 'bronze', 'total'], ['1', 'germany', '5', '3', '4', '12'], ['2', 'sweden', '2', '3', '3', '9'], ['3', 'hungary', '2', '2', '0', '4'], ['4', 'belgium', '0', '1', '0', '1'], ['5', 'czechoslovakia', '0', '0', '1', '1'], ['5', 'great britain', '0', '0', '1', '1'], ['total', 'total', '9', '9', '9', '27']]
ref: Hungary finished ahead of Belgium by 3 Total medal
template: [ENT] finished ahead of [ENT] by 3 [ENT] medal