def josephus(people, step=2):
    if (step <= 1):
        print('Enter step value, greater than 1')
    else:
        step -= 1
        kill = step
        while (len(people) > 1):
            print(people.pop(kill))
            kill = ((kill + step) % len(people))
        print(people[0], 'is safe')
def josephus(people, step=2):
    if (step <= 1):
        print('Enter step value, greater than 1')
    else:
        step -= 1
        kill = step
        while (len(people) > 1):
            print(people.pop(kill))
            kill = ((kill + step) % len(people))
        print(people[0], 'is safe')