n = int(raw_input())
a = map(int,raw_input().split(' '))

nswap=0
for i in range(n):
    min_v = a[i]
    min_p = i
    for j in range(i,n):
        if min_v > a[j]:
            min_v = a[j]
            min_p = j
    if min_p != i:
        a[i],a[min_p]=a[min_p],a[i]
        nswap+=1

print ' '.join([str(v) for v in a])
print nswap n = int(raw_input()) n int(raw_input()) int raw_input() raw_input a = map(int,raw_input().split(' ')) a map(int,raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' nswap=0 nswap 0 for i in range(n):
    min_v = a[i]
    min_p = i
    for j in range(i,n):
        if min_v > a[j]:
            min_v = a[j]
            min_p = j
    if min_p != i:
        a[i],a[min_p]=a[min_p],a[i]
        nswap+=1 i range(n) range n min_v = a[i] min_v a[i] a i min_p = i min_p i for j in range(i,n):
        if min_v > a[j]:
            min_v = a[j]
            min_p = j
     j range(i,n) range i n if min_v > a[j]:
            min_v = a[j]
            min_p = j
     min_v > a[j] min_v a[j] a j min_v = a[j] min_v a[j] a j min_p = j min_p j if min_p != i:
        a[i],a[min_p]=a[min_p],a[i]
        nswap+=1 min_p != i min_p i a[i],a[min_p]=a[min_p],a[i] a[i] a i a[min_p] a min_p a[min_p] a min_p a[i] a i nswap+=1 nswap 1 print str(v) for v in a for v in a v a for v in a str(v) str v ' '.join([str(v) for v in a]) ' '.join ' ' join [str(v) for v in a] print min_v = a[j] a[j] min_v n = int(raw_input()) int(raw_input()) n nswap=0 0 nswap min_p = j j min_p min_p = i i min_p nswap+=1 1 nswap a = map(int,raw_input().split(' ')) map(int,raw_input().split(' ')) a min_v = a[i] a[i] min_v
n = int(raw_input())
a = map(int,raw_input().split(' '))

nswap=0
for i in range(n):
    min_v = a[i]
    min_p = i
    for j in range(i,n):
        if min_v > a[j]:
            min_v = a[j]
            min_p = j
    if min_p != i:
        a[i],a[min_p]=a[min_p],a[i]
        nswap+=1

print ' '.join([str(v) for v in a])
print nswap