N = int(input())
A = [int(a) for a in input().split(" ")]
swapnum = 0
for i in range(N):
    mini = i
    swap = False
    for j in range(i, N):
        if A[j] < A[mini]:
            mini = j
            swap = True
    if swap:
        tmp = A[i]
        A[i] = A[mini]
        A[mini] = tmp
        swapnum += 1
print(" ".join([str(a) for a in A]))
print(swapnum) N = int(input()) N int(input()) int input() input int(a) for a in input().split(" ") for a in input().split(" ") a input().split(" ") ().split () input split " " for a in input().split(" ") int(a) int a A = [int(a) for a in input().split(" ")] A [int(a) for a in input().split(" ")] swapnum = 0 swapnum 0 for i in range(N):
    mini = i
    swap = False
    for j in range(i, N):
        if A[j] < A[mini]:
            mini = j
            swap = True
    if swap:
        tmp = A[i]
        A[i] = A[mini]
        A[mini] = tmp
        swapnum += 1 i range(N) range N mini = i mini i swap = False swap False for j in range(i, N):
        if A[j] < A[mini]:
            mini = j
            swap = True
     j range(i, N) range i N if A[j] < A[mini]:
            mini = j
            swap = True
     A[j] < A[mini] A[j] A j A[mini] A mini mini = j mini j swap = True swap True if swap:
        tmp = A[i]
        A[i] = A[mini]
        A[mini] = tmp
        swapnum += 1 swap tmp = A[i] tmp A[i] A i A[i] = A[mini] A[i] A i A[mini] A mini A[mini] = tmp A[mini] A mini tmp swapnum += 1 swapnum 1 str(a) for a in A for a in A a A for a in A str(a) str a print(" ".join([str(a) for a in A])) print " ".join([str(a) for a in A]) " ".join " " join [str(a) for a in A] print(swapnum) print swapnum swapnum += 1 1 swapnum swap = False False swap A = [int(a) for a in input().split(" ")] [int(a) for a in input().split(" ")] A mini = i i mini mini = j j mini tmp = A[i] A[i] tmp N = int(input()) int(input()) N swap = True True swap swapnum = 0 0 swapnum
N = int(input())
A = [int(a) for a in input().split(" ")]
swapnum = 0
for i in range(N):
    mini = i
    swap = False
    for j in range(i, N):
        if A[j] < A[mini]:
            mini = j
            swap = True
    if swap:
        tmp = A[i]
        A[i] = A[mini]
        A[mini] = tmp
        swapnum += 1
print(" ".join([str(a) for a in A]))
print(swapnum)