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

struct state {
    string name; //name of state
    //struct county *c; //name of counties
    int counties; //number of counties in state
    int population; //total population of state
    
	bool operator< (const state& rhs) {
	    return lexicographical_compare(name.cbegin(), name.cend(), rhs.name.cbegin(), rhs.name.cend());
	}
	
	bool operator== (const state& rhs) {
	    return name == rhs.name;
	}    
};

int main() {
	state array[] = {{"happy"s, 1, 2}, {"sad"s, 3, 4}, {"normal", 5, 6}};
	
	sort(begin(array), end(array));
	
	for(auto& i : array){
		cout << i.name << endl;
	}
}