#include <iostream> using namespace std; int main(){ int n,p,k; cin >> n >> p >> k; bool hasLeft = true, hasRight = true; int first = p-k,last = p + k; if( p - k <= 1) first = 1,hasLeft = false; if( p + k >= n) last = n,hasRight = false; if(hasLeft) cout<<"<< "; for(int i = first; i<= last; ++ i){ if(i == p) cout<<"("<<p<<") "; else cout<<i<<" "; } if(hasRight) cout<<" >>"<<endl; }