Загрузка данных


import random

prefixes = ['S', 'M', 'U', 'P']
roots = ['G', 'P', 'M', 'N']
start = int(input())
end = int(input())
step = int(input())
symbols = input().strip()
prefix = random.choice(prefixes)
root = random.choice(roots)
number = random.randrange(start, end + 1, step)
symbol = random.choice(symbols)
nickname = f"{prefix}{root}{number}{symbol}"
print(nickname)