import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] agrs) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
Queue<Integer> queue = new LinkedList<>();
StringBuilder sb = new StringBuilder();
StringTokenizer st = new StringTokenizer(br.readLine());
int n = Integer.parseInt(st.nextToken());
int k = Integer.parseInt(st.nextToken());
sb.append("<");
for(int i=1; i<=n; i++) {
queue.offer(i);
}
while(n-- > 1) {
for(int i=1; i<k; i++) {
queue.offer(queue.poll());
}
sb.append(String.valueOf(queue.poll())).append(", ");
}
sb.append(String.valueOf(queue.poll())).append(">");
br.close();
System.out.println(sb.toString());
}
}