#include #include using namespace std; int main() { int h, w; cin >> h >> w; vector picture(h); double avg_x = 0; int mass = 0; for(int y=0; y> picture[y]; for(int x=0; x0; x--) { if (picture[h-1][x] != '.') { base_max_x = x; break; } } if (avg_x < base_min_x) cout << "left"; else if (avg_x > base_max_x) cout << "right"; else cout << "balanced"; }