import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner kb = new Scanner(System.in);
int n = kb.nextInt();
int k = kb.nextInt();
Queue<Integer> queue = new LinkedList<>();
StringBuilder sb = new StringBuilder();
for(int i=1; i<= n; i++ ) {
queue.add(i);
}
sb.append("<");
while(queue.size()>1) {
for(int i=0; i<k-1; i++) {
queue.add(queue.poll());
}
sb.append(queue.poll()).append(", ");
}
sb.append(queue.poll()).append(">");
System.out.println(sb.toString());
}
}