#include <bits/stdc++.h>
using namespace std;
const int inf = (int)(1e9);
const int mod = inf + 7;
const double pi = acos(-1.0);
const double eps = 1e-9;
map<char, int> id;
string second;
vector<int> g[100100];
stack<string> st;
int main() {
  cin >> second;
  int h = 0;
  for (int i = 0; i < second.length();) {
    string t = "";
    t += second[i];
    t += second[i + 1];
    t += second[i + 2];
    if (second[i + 1] == '/') t += second[i + 3];
    if ((int)t.size() == 3) {
      for (int j = 0; j < 2 * h; j++) cout << ' ';
      cout << t << endl;
      h++;
      i += 3;
    } else {
      h--;
      for (int j = 0; j < 2 * h; j++) cout << ' ';
      cout << t << endl;
      i += 4;
    }
  }
  return 0;
}
