#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
int CASE = 1;
const int mxn = 2e5 + 1;
const long long INF = 1e18;
bool prime(int n) {
  if (n <= 1) return false;
  if (n == 2 or n == 3) return true;
  if (n % 2 == 0 or n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i += 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long __gcd(long long a, long long b) { return !b ? a : __gcd(b, a % b); }
void solve() {
  string s;
  cin >> s;
  vector<string> v;
  while (s.find(">") != -1) {
    string str = s.substr(0, s.find(">") + 1);
    s.erase(0, str.length());
    v.push_back(str);
  }
  int cnt = 0;
  map<char, vector<int> > mp;
  for (string str : v) {
    if (str.find("/") != -1) {
      for (long long i = 0; i < mp[str[str.length() - 2]].back(); i++)
        cout << ' ';
      cout << str << endl;
      mp[str[str.length() - 2]].pop_back();
      cnt -= 2;
    } else {
      mp[str[str.length() - 2]].push_back(cnt);
      for (long long i = 0; i < cnt; i++) cout << ' ';
      cout << str << endl;
      cnt += 2;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
