#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <valarray>
#include <vector>

#define EPS 1e-9
#define INF 1070000000LL
#define MOD 1000000007LL
#define fir first
#define foreach(it,X) for(__typeof((X).begin()) it=(X).begin();it!=(X).end();it++)
#define ite iterator
#define mp make_pair
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<(n);i++)
#define pb push_back
#define sec second
#define sz(x) ((int)x.size())

using namespace std;

struct timer{
	time_t start;
	timer(){start=clock();}
	~timer(){cerr<<1.*(clock()-start)/CLOCKS_PER_SEC<<" secs"<<endl;}
};

typedef istringstream iss;
typedef long long ll;
typedef pair<int,int> pi;
typedef stringstream sst;
typedef vector<int> vi;

vector<string> key;

int main(){
	cin.tie(0);
	ios_base::sync_with_stdio(0);
	
	string q;
	getline(cin,q);
	string s;
	rep(i,sz(q)+1){
		if(i==sz(q) || q[i]=='.'){
			if(i)key.pb(s);
			s="";
		}else s+=q[i];
	}
	int cur=0,indent=0;
	int wait=0;
	while(getline(cin,s)){
		int space=0;
		while(space<sz(s) && s[space]==' ')space++;
		if(wait==1){
			indent=space;
			wait=0;
		}
		if(space < indent){
			break;
		}
		if(space > indent){
			continue;
		}
		int colon=s.find(":");
		string t=s.substr(indent,colon-indent);
		if(t!=key[cur]){
			continue;
		}
		if(colon==sz(s)-1){
			if(cur==sz(key)-1){
				cout<<"object"<<endl;
				return 0;
			}
			else cur++,wait=1;
		}
		else{
			if(cur==sz(key)-1){
				cout<<"string \""<<s.substr(colon+2)<<"\""<<endl;
				return 0;
			}
			else break;
		}
	}
	cout<<"no such property"<<endl;
}