#include <bits/stdc++.h>
using namespace std;
bool is_sqr(int x) {
  int u = lround(sqrt(x));
  return x == u * u;
}
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
void solve() {
  string str;
  cin >> str;
  int h = 0;
  bool b = 1;
  for (int i = 0; i < str.size() - 1; ++i) {
    if (str[i] == '<' && b)
      cout << string(h, ' ');
    else if (str[i] == '<' && b == 0) {
      cout << string(h, ' ');
      h -= 2;
    }
    cout << str[i];
    if (str[i] == '>' && str[i + 2] != '/') {
      h += 2;
      cout << endl;
      b = 1;
    } else if (str[i] == '>' && str[i + 2] == '/') {
      cout << endl;
      b = 0;
    }
  }
  cout << str[str.size() - 1];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
  return 0;
}
