#include <bits/stdc++.h>
using namespace std;
bool isPrime(int num) {
  bool prime = true;
  for (int i = 2; i <= num / 2; i++) {
    if (num % i == 0) {
      prime = false;
      break;
    }
  }
  return prime;
}
vector<int> primeFactors(int n) {
  vector<int> ans;
  while (n % 2 == 0) {
    ans.push_back(2);
    n = n / 2;
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      ans.push_back(i);
      n = n / i;
    }
  }
  if (n > 2) ans.push_back(n);
  return ans;
}
int main() {
  string xml;
  cin >> xml;
  int level = 0;
  vector<char> allchar;
  for (int i = 0; i < xml.length();) {
    if (xml[i + 1] != '/') {
      int t = level;
      for (int i = 0; i < t; i++) cout << " ";
      cout << '<' << xml[i + 1] << '>' << endl;
      level += 2;
      i += 3;
    } else {
      level -= 2;
      int t = level;
      for (int i = 0; i < t; i++) cout << " ";
      cout << "</" << xml[i + 2] << '>' << endl;
      i += 4;
    }
  }
  return 0;
}
