#yuki1859 n=int(input()) a=list(map(int,input().split())) s=input() t='' a.append(a[0]) for i in range(n): if a[i]>a[i+1]: t+='>' else: t+='<' t+=t print(t.find(s))