N = input()
A = map(int,raw_input().split())

x = 0

for i in range(N):
    minj = i
    y = 0
    for j in range(i,N):
        if A[j] < A[minj]:
            minj = j
            y = 1
            
    v = A[i]
    A[i] = A[minj]
    A[minj] = v
    x += y
    
for i in range(N-1):
    print A[i],
print A[-1]

print x N = input() N input() input A = map(int,raw_input().split()) A map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split x = 0 x 0 for i in range(N):
    minj = i
    y = 0
    for j in range(i,N):
        if A[j] < A[minj]:
            minj = j
            y = 1
            
    v = A[i]
    A[i] = A[minj]
    A[minj] = v
    x += y
     i range(N) range N minj = i minj i y = 0 y 0 for j in range(i,N):
        if A[j] < A[minj]:
            minj = j
            y = 1
            
     j range(i,N) range i N if A[j] < A[minj]:
            minj = j
            y = 1
            
     A[j] < A[minj] A[j] A j A[minj] A minj minj = j minj j y = 1 y 1 v = A[i] v A[i] A i A[i] = A[minj] A[i] A i A[minj] A minj A[minj] = v A[minj] A minj v x += y x y for i in range(N-1):
    print A[i], i range(N-1) range N-1 N 1 print A[i] A i print A[-1] A -1 print x = 0 0 x v = A[i] A[i] v y = 0 0 y y = 1 1 y x += y y x A = map(int,raw_input().split()) map(int,raw_input().split()) A minj = i i minj N = input() input() N minj = j j minj
N = input()
A = map(int,raw_input().split())

x = 0

for i in range(N):
    minj = i
    y = 0
    for j in range(i,N):
        if A[j] < A[minj]:
            minj = j
            y = 1
            
    v = A[i]
    A[i] = A[minj]
    A[minj] = v
    x += y
    
for i in range(N-1):
    print A[i],
print A[-1]

print x