t = int(input())
ans = []
for _ in range(t):

    n = int(input())
    s = input()
    count = 0


    if s[0] == '<':
            for i in range(1,n):
                if s[i]== '>':
                    count+=1
            ans.append(count)
            break
    else:
        ans.append(0)



print(*ans)


