#!/usr/bin/env python

import argparse
import secrets


parser = argparse.ArgumentParser()
parser.add_argument("choice", nargs="+", help="Choices to randomize")
args = parser.parse_args()

if len(args.choice) == 1:
    try:
        lower, upper = args.choice[0].split("-", 1)
    except ValueError:
        try:
            choices = [int(args.choice[0])]
        except ValueError:
            choices = [args.choice[0]]
    else:
        lower, upper = int(lower), int(upper)
        choices = range(lower, upper)
else:
    choices = args.choice

print(secrets.choice(choices))
