#include <bits/stdc++.h>
using namespace std;
int n;
string s;
bool opentag(int i) {
  if (i + 2 >= s.size()) return false;
  return s[i] == '<' && (s[i + 1] >= 'a' && s[i + 1] <= 'z') && s[i + 2] == '>';
}
bool closetag(int i) {
  if (i + 3 >= s.size()) return false;
  return s[i] == '<' && s[i + 1] == '/' &&
         (s[i + 2] >= 'a' && s[i + 2] <= 'z') && s[i + 3] == '>';
}
int main() {
  cin >> s;
  int h = 0;
  int i = 0;
  stack<string> ss;
  while (i < s.size()) {
    if (opentag(i)) {
      ss.push(s.substr(i, 3));
      for (int j = 0; j < 2 * h; j++) cout << " ";
      cout << s.substr(i, 3) << endl;
      i += 2;
      h++;
    } else if (closetag(i)) {
      string temp = ss.top();
      string current = s.substr(i, 4);
      if (temp[1] == current[2]) {
        h--;
        for (int j = 0; j < 2 * h; j++) cout << " ";
        cout << s.substr(i, 4) << endl;
        ss.pop();
      }
    }
    i++;
  }
  return 0;
}
