#!/usr/bin/python3
import random
import string
import sys
import os

if len(sys.argv) != 4:
    print('Call with',sys.argv[0],"<filename> <seed> <max>")
    print('e.g.',sys.argv[0],"data/secret/01-random.in 42 1000")
    exit(1)

fn = sys.argv[1]
seed = sys.argv[2]
maximum = sys.argv[3]

random.seed(int(seed))

with open(fn, 'w', newline='\n') as in_file:
    print(random.randint(1,int(maximum)), file=in_file)
