#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  long long h = -1;
  getline(cin, s);
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == '/') {
      for (long long j = 0; j < 2 * h; j++) {
        cout << ' ';
      }
      cout << "</" << s[i + 1] << ">";
      i += 2;
      h--;
      cout << "\n";
    } else if (s[i] - 'a' >= 0) {
      h++;
      for (long long j = 0; j < 2 * h; j++) {
        cout << ' ';
      }
      cout << "<" << s[i] << ">";
      i += 2;
      cout << "\n";
    }
  }
  return 0;
}
