#include <bits/stdc++.h>
using namespace std;
void sp(int ix) {
  for (int i = 0; i < ix; i++) cout << "  ";
}
int main() {
  string s;
  getline(cin, s);
  for (int i = 0; i < s.length(); i++)
    if (s[i] == '>' || s[i] == '<') s[i] = ' ';
  stringstream ss(s);
  string z;
  int lvl = 0;
  while (ss >> z) {
    if (z[0] != '/') {
      sp(lvl);
      cout << '<' << z << '>' << endl;
      lvl++;
    } else {
      --lvl;
      sp(lvl);
      cout << '<' << z << '>' << endl;
    }
  }
}
