# Arup Guha
# 9/5/2023
# Solution to 2023 UCF Locals Final Round Problem: The Duel of Smokin' Joe

# Returns the number of even lengthed cycles in perm.
def numEvenCycles(perm):

    n = len(perm)

    # Set up visited array.
    visited =[]
    for i in range(n):
        visited.append(False)

    cnt = 0

    # Start marking cycles.
    for i in range(n):

        # Been here.
        if visited[i]:
            continue

        # Start at i.
        x = i
        dist = 0

        # Follow the links until we return!
        while not visited[x]:
            dist += 1
            visited[x] = True
            x = perm[x]

        # Update if it's an even length cycle.
        if dist%2 == 0:
            cnt += 1

    return cnt

def main():

    # Read perm, make 0 based.
    n = int(input())
    perm = [int(x) for x in input().split()]
    for i in range(n):
        perm[i] -= 1

    # Find # of even cycles.
    res = numEvenCycles(perm)

    # The # of even cycles always changes each move, so this is the answer.
    if res%2 == 1:
        print("Smokin Joe!")
    else:
        print("Oh No!")

# Run it!
main()
