#include <bits/stdc++.h>
#pragma comment(linker, "/stack:64000000")
using namespace std;
int main() {
  string s;
  cin >> s;
  int k = -1;
  vector<string> tags;
  for (int(i) = 0; (i) < ((int)(s).size()); (i)++) {
    if (s[i] == '<') {
      k = i;
    } else if (s[i] == '>') {
      tags.push_back(s.substr(k + 1, i - k - 1));
    }
  }
  vector<string> stack;
  for (int(i) = 0; (i) < ((int)(tags).size()); (i)++) {
    string t = tags[i];
    if (t[0] == '/') {
      assert(t.substr(1) == stack.back());
      stack.pop_back();
    } else {
      stack.push_back(t);
    }
    int k = 2 * (int)(stack).size();
    if (t[0] != '/') k -= 2;
    for (int(i) = 0; (i) < (k); (i)++) cout << " ";
    cout << "<" << t << ">\n";
  }
  return 0;
}
