def parse_instruction(line):
    """Parse line with instruction to tuple representing it."""
    instruction, element, *parts = line.split()
    if parts:
        return (instruction, element[:-1], int(parts[0]))
    if element.isalpha():
        return (instruction, element)
    return (instruction, int(element))