To find the median from the grouped data, the frequencies are given as {4, 5, 1, 7}. Find the cumulative frequencies.