import org.springframework.util.DigestUtils;

import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class TestAdam {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int dbs = scanner.nextInt();
        String[] keys = {
                "adam:incr:member_no",
                "adam:ad:info",
                "adam:blacklist:member:uid",

                "adam:identity:mobile:13724286255",
                "adam:info:user:270535560903720963807517",
                "adam:info:morder:2104440",
                "adam:info:morder:2104440",
                "adam:info:umember:2104440",
                "adam:info:real_name:2104440",
                "adam:info:third_party:2104440",
                "adam:info:enters:2104440",
                "adam:info:addresses:2104440",

                "adam:identity:mobile:18505123456",
                "adam:identity:sso:245482441472573441815566",
                "adam:info:user:310508344264376327445470",
                "adam:morder:2283655",
                "adam:info:umember:1404935",
                "adam:info:morder:1404935",

                "adam:info:member:simple",
                "adam:info:member:category:1",
                "adam:info:member:rights:1",
                "adam:info:member:rights:v:1",
                "adam:info:tags:music",
                "adam:info:tags:sex",
                "adam:info:morder:2292617",
                "adam:info:certification_junk:1510827199912020821",

                "candy:basic:coupon_code:0Jxko0wLWQdoTTF4",
                "candy:basic:coupon_code:MJIoHC2qVZ0lp9UI",
                "candy:basic:user_coupon:270788673588551684937456",
                "candy:basic:coupon_info:20210906143324612",
                "candy:basic:common_coupon",


                "sweet:manual:pushList",
        };
        for (String key : keys) {
            long value = key.hashCode();
            int idx = ((int) (value ^ (value >>> 32)) % dbs);
            System.out.printf("\n[%s] - idx:%s", key, idx);
        }
    }
}
