n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(0, n):
	minj = min(range(i, n), key=lambda j: a[j])
	if i != minj:
		a[i], a[minj] = a[minj], a[i]
		count += 1
print(*a)
print(count) n = int(input()) n int(input()) int input() input a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split count = 0 count 0 for i in range(0, n):
	minj = min(range(i, n), key=lambda j: a[j])
	if i != minj:
		a[i], a[minj] = a[minj], a[i]
		count += 1 i range(0, n) range 0 n minj = min(range(i, n), key=lambda j: a[j]) minj min(range(i, n), key=lambda j: a[j]) min range(i, n) range i n key=lambda j: a[j] key lambda j: a[j] a[j] a j j if i != minj:
		a[i], a[minj] = a[minj], a[i]
		count += 1 i != minj i minj a[i], a[minj] = a[minj], a[i] a[i] a i a[minj] a minj a[minj] a minj a[i] a i count += 1 count 1 print(*a) print *a a print(count) print count a = list(map(int, input().split())) list(map(int, input().split())) a count = 0 0 count minj = min(range(i, n), key=lambda j: a[j]) min(range(i, n), key=lambda j: a[j]) minj n = int(input()) int(input()) n count += 1 1 count
n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(0, n):
	minj = min(range(i, n), key=lambda j: a[j])
	if i != minj:
		a[i], a[minj] = a[minj], a[i]
		count += 1
print(*a)
print(count)
