#include <iostream>
#include <string>
#include <limits>
using namespace std;

int main() {
    string password;

    cout << "Please enter the password!" << endl;
    do {
        cin >> password;
        if (password == "test") break;
        cin.clear();
        cin.ignore(numeric_limits<streamsize>::max(), '\n');
        cout << "Access denied! Try again." << endl;
    }
    while (true);

    cout << "Access granted!";
    return 0;
}