#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
ostream& operator<<(ostream& os, const pair<A, B>& p) {
  return os << '(' << p.first << ", " << p.second << ')';
}
const int inf = 0x3f3f3f3f;
const long long inf64 = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-5;
int main() {
  ios_base::sync_with_stdio(false);
  string s;
  cin >> s;
  for (int i = 0; i < (int((s).size())); i++)
    if (s[i] == '<' || s[i] == '>') s[i] = ' ';
  stringstream ss(s);
  int h = 0;
  while (ss >> s) {
    if (s[0] == '/') {
      h -= 2;
      for (int i = 0; i < h; i++) cout << ' ';
      cout << '<' << s << '>' << endl;
    } else {
      for (int i = 0; i < h; i++) cout << ' ';
      cout << '<' << s << '>' << endl;
      h += 2;
    }
  }
  return 0;
}
