#include <map>
#include <string>
#include <iostream>
#include <iomanip>

// for clarity:
typedef std::string word_type ;
typedef std::string tag_type;

int main()
{
    std::map<word_type, std::map<tag_type, int>> wordcount;

    wordcount["fly"]["V"] = 35;
    wordcount["fly"]["N"] = 150;

    wordcount["fill"]["V"] = 49;
    wordcount["fill"]["N"] = 20;

    wordcount["time"]["V"] = 19;
    wordcount["time"]["N"] = 90;

    for (auto& tag : wordcount)
    {
        std::cout << std::left << std::setw(10) << tag.first << '\n';

        for (auto & count : tag.second)
        {
            std::cout << std::setw(10) << "";
            std::cout << '[' << count.first << ']';
            std::cout << std::right << std::setw(5) << count.second << '\n';
        }

        std::cout << '\n';
    }
}