import java.io.PrintStream;

public class Program {
    public static void main(String[] args) {
        testLruCache(System.out);
    }

    private static void testLruCache(PrintStream ps) {
        var lruCache = new LruCache<>(2);
        lruCache.put(1, "one");
        lruCache.put(2, "two");
        ps.println("Element: " + lruCache.get(1));
        ps.println("Element: " + lruCache.get(1));
        ps.println("Element: " + lruCache.get(1));

        lruCache.put(3, "three");
        ps.println("Element: " + lruCache.get(2));
        lruCache.put(4, "four");
        ps.println("Element: " + lruCache.get(4));
        ps.println("Element: " + lruCache.get(3));
        ps.println("Element: " + lruCache.get(2));
        ps.println("Element: " + lruCache.get(1));
    }
}
