length = int(input())
targ = [int(n) for n in input().split(' ')]
ans = 0
for l in range(length):
    value = l
    for init in range(l + 1,length):
        if targ[value] > targ[init]:
            value = init
    if value != l:
        disp = targ[l]
        targ[l] = targ[value]
        targ[value] = disp
        ans += 1
print(' '.join([str(n) for n in targ]))
print(ans) length = int(input()) length int(input()) int input() input int(n) for n in input().split(' ') for n in input().split(' ') n input().split(' ') ().split () input split ' ' for n in input().split(' ') int(n) int n targ = [int(n) for n in input().split(' ')] targ [int(n) for n in input().split(' ')] ans = 0 ans 0 for l in range(length):
    value = l
    for init in range(l + 1,length):
        if targ[value] > targ[init]:
            value = init
    if value != l:
        disp = targ[l]
        targ[l] = targ[value]
        targ[value] = disp
        ans += 1 l range(length) range length value = l value l for init in range(l + 1,length):
        if targ[value] > targ[init]:
            value = init
     init range(l + 1,length) range l + 1 l 1 length if targ[value] > targ[init]:
            value = init
     targ[value] > targ[init] targ[value] targ value targ[init] targ init value = init value init if value != l:
        disp = targ[l]
        targ[l] = targ[value]
        targ[value] = disp
        ans += 1 value != l value l disp = targ[l] disp targ[l] targ l targ[l] = targ[value] targ[l] targ l targ[value] targ value targ[value] = disp targ[value] targ value disp ans += 1 ans 1 str(n) for n in targ for n in targ n targ for n in targ str(n) str n print(' '.join([str(n) for n in targ])) print ' '.join([str(n) for n in targ]) ' '.join ' ' join [str(n) for n in targ] print(ans) print ans ans += 1 1 ans value = l l value value = init init value length = int(input()) int(input()) length targ = [int(n) for n in input().split(' ')] [int(n) for n in input().split(' ')] targ ans = 0 0 ans disp = targ[l] targ[l] disp
length = int(input())
targ = [int(n) for n in input().split(' ')]
ans = 0
for l in range(length):
    value = l
    for init in range(l + 1,length):
        if targ[value] > targ[init]:
            value = init
    if value != l:
        disp = targ[l]
        targ[l] = targ[value]
        targ[value] = disp
        ans += 1
print(' '.join([str(n) for n in targ]))
print(ans)