#include <iostream>
#include <stdio.h>
#include <queue>
#include <vector>

using namespace std;

priority_queue<int> pq;
vector<int> adj[15];
int in[15];

int main()
{
    int k;
    char ch,s;
    scanf("%d%c", &k,&s);
    for(int i=1;i<=k;i++){
        scanf("%c%c",&ch, &s);
        cout<<ch<<endl;
        if(ch=='<'){ // i --> i+1
            adj[i].push_back(i+1);
            in[i+1]++;
        }
        else{ // i+1 -> i
            adj[i+1].push_back(i);
            in[i]++;
        }
    }
    for(int i=1;i<=k+1;i++){
        if(in[i]==0){
            pq.push(-1*i);
        }
    }
    int x=0, ans[15];
    while(!pq.empty()){
        int here=-1*pq.top(); pq.pop();
        cout<<here<<endl;
        ans[here]=x++;
        for(int i=0;i<adj[here].size();i++)
        {
            int there=adj[here][i];
            in[there]--;
            if(in[there]==0){
                pq.push(-1*there);
            }
        }
    }
    for(int i=1;i<=k+1;i++)
        cout<<ans[i]<<" ";
    return 0;
}