#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  string xml;
  int level = 0;
  cin >> xml;
  for (int i = 0; i < xml.size(); i += 3) {
    if (xml[i + 1] != '/') {
      for (int i = 1; i <= level * 2; i++) cout << " ";
      cout << xml.substr(i, 3) << endl;
      level++;
    } else {
      level--;
      for (int i = 1; i <= level * 2; i++) cout << " ";
      cout << xml.substr(i, 4) << endl;
      i++;
    }
  }
  return 0;
}
