public static Input input_putFromHandToLibrary(final String TopOrBottom, final int num) {
        Input target = new Input() {
            private static final long serialVersionUID = 5178077952030689103L;
            public int n = 0;

            @Override
            public void showMessage() {
                AllZone.getDisplay().showMessage("Select a card to put on the " + TopOrBottom + " of your library.");
                ButtonUtil.disableAll();

                if (n == num || AllZone.getHumanHand().size() == 0) stop();
            }

            @Override
            public void selectButtonCancel() {
                stop();
            }

            @Override
            public void selectCard(Card card, PlayerZone zone) {
                if (zone.is(Constant.Zone.Hand)) {
                    int position = 0;
                    if (TopOrBottom.equalsIgnoreCase("bottom"))
                        position = -1;

                    AllZone.getGameAction().moveToLibrary(card, position);

                    n++;
                    if (n == num) stop();

                    showMessage();
                }
            }
        };
        return target;
    }