#include <bits/stdc++.h>
using namespace std;
string f(int n) { return string(n, ' '); }
int check(int i, const string &s) {
  int n = (int)s.size();
  if (i + 2 < n && s[i] == '<' && s[i + 2] == '>') return -1;
  if (i + 3 < n && s[i] == '<' && s[i + 1] == '/' && s[i + 3] == '>') return 1;
  return 0;
}
int main() {
  string s;
  cin >> s;
  ostringstream oss;
  int space = 0;
  int i = 0;
  while (i < s.size()) {
    int flag = check(i, s);
    if (flag == -1) {
      oss << f(space) << s.substr(i, 3);
      i += 3;
      oss << endl;
      space += 2;
    } else if (flag == 1) {
      space -= 2;
      oss << f(space) << s.substr(i, 4);
      i += 4;
      oss << endl;
    }
  }
  cout << oss.str() << endl;
  return 0;
}
