#!/usr/bin/env python
from sys import stdin

import matplotlib
from matplotlib import pyplot as plt

labels, counts = [], []

for line in stdin:
    count, label = line.strip().split()
    labels.append(label)
    counts.append(int(count))

matplotlib.rc("xtick", labelsize=16)
matplotlib.rc("ytick", labelsize=16)

plt.figure(dpi=300)
plt.xlabel('Count', fontsize=20)
plt.ylabel('Item', fontsize=20)

plt.barh(labels, counts)
plt.tight_layout()
plt.show()
