#!/usr/bin/env python3

import os, sys, pathlib, string

args = sys.argv

if len(args) == 1:
    print('Oops!', file=sys.stderr)
    exit(1)

path = pathlib.Path('sample_input')
path.exists() or path.touch()

until = args[1].upper()
extension = args[2] if len(args) > 2 else 'cpp'

for c in string.ascii_uppercase:
    path = pathlib.Path(f'{c}.{extension}')

    path.exists() or path.touch()

    if c == until:
        exit(0)
