Task: Program Execution
Input (English): 2, 2, ['2817', 'n', 'x', 'g', 'h', '7247', '6333', '7389', '7499', '4627', '8677', 'W']
Output (English): n, g, 7247, 7389, 4627, W