Task: Program Execution
Input (English): d, w, 3747, 3695, 5791, N, E, 9729, Y, 2983, 3061, h
Output (English): 1, 2, 6, 7, 9, 12