#include <iostream>
#include <string>
#include <set>
#include <algorithm>
using namespace std;

int main() {
	string s("galgje");
	set<int> v;
	do {
		// auto can not be used here because auto will select int instead of string::size_type
		for (string::size_type i(0); i<s.size(); ++i) {
			if (find(v.begin(), v.end(), i)==v.end())
				cout<<'.';
			else
				cout<<s[i];
		}
		cout<<endl<<"Geef een letter: ";
		char c;
		cin>>c;
		auto r(s.begin());
		while ((r=find(r, s.end(), c))!=s.end()) {
			v.insert(r-s.begin());
			++r;
		}
	}
	while (v.size()!=s.size());
	cout<<s;
	cin.get();
	cin.get();
	return 0;
}
