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:identity:mobile:15529282737",
                "adam:info:user:882883",
                "adam:info:morder:882883",
                "adam:info:umember:882883",
                "adam:info:real_name:882883",
                "adam:info:third_party:882883",
                "adam:info:enters:882883",
                "adam:info:addresses:882883",
                "adam:info:member:code:GMRGBUQB30",
                "adam:info:certification:1141181199209160192",

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

                "adam:info:member:simple",
                "adam:info:member:category:1",
                "adam:info:member:agreement",
                "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);
        }
    }
}
