#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<string> v1;
  string z("");
  for (int i = 0; i < s.length(); i++) {
    z = z + s[i];
    if (s[i] == '>') {
      v1.push_back(z);
      z = "";
    }
  }
  int carr = 0;
  for (int i = 0; i < v1.size(); i++) {
    if (v1[i].size() == 3) {
      for (int j = 0; j < 2 * carr; j++) cout << " ";
      cout << v1[i];
      carr++;
    } else if (v1[i].size() == 4) {
      for (int j = 0; j < 2 * (carr - 1); j++) cout << " ";
      cout << v1[i];
      carr--;
    }
    cout << endl;
  }
}
