#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char const *argv[]) {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  int N, max, min;
  scanf("%d", &N);
  char s[N - 1];
  scanf("%s", s);
  min = 1;
  max = N;
  for (int i = 0; i < N - 1; ++i) {
    if (s[i] == '<')
      printf("%d ", min++);
    else
      printf("%d ", max--);
  }
  printf("%d\n", min);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    0xeaa(%rip),%rdi
lea    0xead(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edx
lea    0xe9a(%rip),%rdi
lea    0xe9e(%rip),%rsi
call   1040 <freopen@plt>
lea    0xe94(%rip),%rdi
xor    %eax,%eax
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x40(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x30(%rbp)
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x1,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1247 <main+0x117>
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3c,%eax
jne    121d <main+0xed>
mov    -0x1c(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
lea    0xe0c(%rip),%rdi
call   1030 <printf@plt>
jmp    1234 <main+0x104>
mov    -0x18(%rbp),%esi
mov    %esi,%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
lea    0xdf0(%rip),%rdi
call   1030 <printf@plt>
jmp    1239 <main+0x109>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11db <main+0xab>
mov    -0x1c(%rbp),%esi
lea    0xdd2(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
lea    0xeaf(%rip),%rdi
lea    0xeb2(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edx
lea    0xe9f(%rip),%rdi
lea    0xea3(%rip),%rsi
call   1040 <freopen@plt>
lea    0xe99(%rip),%rdi
lea    -0x2c(%rbp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rsp,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %rsp,%r15
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
lea    0xe6f(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    -0x2c(%rbp),%r13d
mov    $0x1,%ebx
cmp    $0x2,%r13d
jl     1215 <main+0xe5>
mov    $0x1,%eax
xor    %r12d,%r12d
lea    0xe4a(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
xor    %ecx,%ecx
xor    %ebx,%ebx
cmpb   $0x3c,(%r15,%r12,1)
setne  %cl
sete   %bl
mov    %r13d,%esi
cmove  %eax,%esi
add    %eax,%ebx
sub    %ecx,%r13d
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%r12
movslq -0x2c(%rbp),%rcx
add    $0xffffffffffffffff,%rcx
mov    %ebx,%eax
cmp    %rcx,%r12
jl     11e0 <main+0xb0>
lea    0xe07(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    -0x38(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"input.txt\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [11 x i8] c"output.txt\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [4 x i8] c"%d \00"
@.str.7 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i32, i32* @stdin
%13 = call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = load i32, i32* @stdout
%15 = call i32 @freopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %14)
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %6)
%17 = load i32, i32* %6
%18 = sub nsw i32 %17, 1
%19 = zext i32 %18 to i64
%20 = call i8* @llvm.stacksave()
store i8* %20, i8** %9
%21 = alloca i8, i64 %19
store i64 %19, i64* %10
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %21)
store i32 1, i32* %8
%23 = load i32, i32* %6
store i32 %23, i32* %7
store i32 0, i32* %11
br label %24
24: ; preds = %45, %2
%25 = load i32, i32* %11
%26 = load i32, i32* %6
%27 = sub nsw i32 %26, 1
%28 = icmp slt i32 %25, %27
br i1 %28, label %29, label %48
29: ; preds = %24
%30 = load i32, i32* %11
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %21, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 60
br i1 %35, label %36, label %40
36: ; preds = %29
%37 = load i32, i32* %8
%38 = add nsw i32 %37, 1
store i32 %38, i32* %8
%39 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %37)
br label %44
40: ; preds = %29
%41 = load i32, i32* %7
%42 = add nsw i32 %41, -1
store i32 %42, i32* %7
%43 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %41)
br label %44
44: ; preds = %40, %36
br label %45
45: ; preds = %44
%46 = load i32, i32* %11
%47 = add nsw i32 %46, 1
store i32 %47, i32* %11
br label %24
48: ; preds = %24
%49 = load i32, i32* %8
%50 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %49)
store i32 0, i32* %3
%51 = load i8*, i8** %9
%52 = load i32, i32* %3
ret i32 %52
}

LLVM IR (-O2):
@.str = [10 x i8] c"input.txt\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [11 x i8] c"output.txt\00"
@.str.3 = [2 x i8] c"w\00"
@stdout = global i32 0
@.str.4 = [3 x i8] c"%d\00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [4 x i8] c"%d \00"
@.str.7 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = load i32, i32* @stdin
%5 = tail call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @stdout
%7 = tail call i32 @freopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %6)
%8 = bitcast i32* %3 to i8*
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %3
%11 = add nsw i32 %10, -1
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
%14 = alloca i8, i64 %12
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %14)
%16 = load i32, i32* %3
%17 = icmp sgt i32 %16, 1
br i1 %17, label %21, label %18
18: ; preds = %21, %2
%19 = phi i32 [ 1, %2 ], [ %30, %21 ]
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %19)
ret i32 0
21: ; preds = %2, %21
%22 = phi i64 [ %35, %21 ], [ 0, %2 ]
%23 = phi i32 [ %33, %21 ], [ %16, %2 ]
%24 = phi i32 [ %30, %21 ], [ 1, %2 ]
%25 = getelementptr inbounds i8, i8* %14, i64 %22
%26 = load i8, i8* %25
%27 = icmp eq i8 %26, 60
%28 = select i1 %27, i32 %24, i32 %23
%29 = zext i1 %27 to i32
%30 = add nuw nsw i32 %24, %29
%31 = xor i1 %27, true
%32 = sext i1 %31 to i32
%33 = add nsw i32 %23, %32
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %28)
%35 = add nuw nsw i64 %22, 1
%36 = load i32, i32* %3
%37 = add nsw i32 %36, -1
%38 = sext i32 %37 to i64
%39 = icmp slt i64 %35, %38
br i1 %39, label %21, label %18
}