#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <numeric>
#include <cctype>
#include <tuple>
#include <array>
#include <cassert>

// BEGIN CUT HERE
#ifdef _MSC_VER
#include <agents.h>
#endif
// END CUT HERE 

#define FOR(i, a, b) for(int i = (int)(a); i < (int)(b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define REV(v) v.rbegin(), v.rend()
#define MEMSET(v, s) memset(v, s, sizeof(v))
#define MP make_pair
#define MT make_tuple

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
typedef unsigned long long ull;

struct dat{
	string value;
	map<string, dat> p;
};

string buf[100000];

int i;
dat mapping(){
	string s;
	dat res;
	int prv = -1;
	while (!buf[i].empty()){
		string &s = buf[i];
		int l = 0;
		while (s[l] == ' ') ++l;
		if (prv < 0) prv = l;
		if (prv != l) break;
		i++;
		int idx = s.find(':');
		string t = s.substr(idx);
		dat d;
		if (t.size() > 2) d.value = t.substr(2);
		else d = mapping();

		res.p[s.substr(l, idx-l)] = d;
	}
	return res;
}

int main(){
	string query;
	cin >> query;
	cin.ignore();
	int len = 0;
	while (getline(cin, buf[len++]));

	dat d = mapping();

	for (auto &c : query) if (c == '.') c = ' ';

	stringstream ss(query);
	string s;
	dat *p = &d;
	while (ss >> s){
		if (!p->p.count(s)) goto NG;
		p = &(p->p[s]);
	}

	if (p->value.empty()) cout << "object" << endl;
	else cout << "string \"" << p->value << "\"" << endl;

	return 0;
NG:
	cout << "no such property" << endl;

	return 0;
}