import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class Main {

    private static final String LINE_SEPARATOR = System.getProperty("line.separator");

    public static void main(String[] args) {
        System.out.println(process(readAll(System.in)));
    }

    protected static String process(String data) {
        final String[] split = data.split("\\n");

        int i = 1;
        StringBuilder sb = new StringBuilder();
        for (String s : split) {
            if ("0".equals(s)) {
                break;
            }
            if (sb.length() > 0) {
                sb.append(LINE_SEPARATOR);
            }
            sb.append("Case ").append(i++).append(": ").append(s);
        }

        return sb.toString();
    }

    protected static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    private static final String LINE_SEPARATOR = System.getProperty("line.separator");

    public static void main(String[] args) {
        System.out.println(process(readAll(System.in)));
    }

    protected static String process(String data) {
        final String[] split = data.split("\\n");

        int i = 1;
        StringBuilder sb = new StringBuilder();
        for (String s : split) {
            if ("0".equals(s)) {
                break;
            }
            if (sb.length() > 0) {
                sb.append(LINE_SEPARATOR);
            }
            sb.append("Case ").append(i++).append(": ").append(s);
        }

        return sb.toString();
    }

    protected static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }
} Main private static final String LINE_SEPARATOR = System.getProperty("line.separator"); LINE_SEPARATOR System.getProperty("line.separator") System.getProperty System "line.separator" public static void main(String[] args) {
        System.out.println(process(readAll(System.in)));
    } main {
        System.out.println(process(readAll(System.in)));
    } System.out.println(process(readAll(System.in))) System.out.println System.out System System.out process(readAll(System.in)) process readAll(System.in) readAll System.in System System.in String[] args args protected static String process(String data) {
        final String[] split = data.split("\\n");

        int i = 1;
        StringBuilder sb = new StringBuilder();
        for (String s : split) {
            if ("0".equals(s)) {
                break;
            }
            if (sb.length() > 0) {
                sb.append(LINE_SEPARATOR);
            }
            sb.append("Case ").append(i++).append(": ").append(s);
        }

        return sb.toString();
    } process {
        final String[] split = data.split("\\n");

        int i = 1;
        StringBuilder sb = new StringBuilder();
        for (String s : split) {
            if ("0".equals(s)) {
                break;
            }
            if (sb.length() > 0) {
                sb.append(LINE_SEPARATOR);
            }
            sb.append("Case ").append(i++).append(": ").append(s);
        }

        return sb.toString();
    } final String[] split = data.split("\\n"); split data.split("\\n") data.split data "\\n" int i = 1; i 1 StringBuilder sb = new StringBuilder(); sb new StringBuilder() for (String s : split) {
            if ("0".equals(s)) {
                break;
            }
            if (sb.length() > 0) {
                sb.append(LINE_SEPARATOR);
            }
            sb.append("Case ").append(i++).append(": ").append(s);
        } String s split {
            if ("0".equals(s)) {
                break;
            }
            if (sb.length() > 0) {
                sb.append(LINE_SEPARATOR);
            }
            sb.append("Case ").append(i++).append(": ").append(s);
        } {
            if ("0".equals(s)) {
                break;
            }
            if (sb.length() > 0) {
                sb.append(LINE_SEPARATOR);
            }
            sb.append("Case ").append(i++).append(": ").append(s);
        } if ("0".equals(s)) {
                break;
            } "0".equals(s) "0".equals "0" s {
                break;
            } break; if (sb.length() > 0) {
                sb.append(LINE_SEPARATOR);
            } sb.length() > 0 sb.length() sb.length sb 0 {
                sb.append(LINE_SEPARATOR);
            } sb.append(LINE_SEPARATOR) sb.append sb LINE_SEPARATOR sb.append("Case ").append(i++).append(": ").append(s) sb.append("Case ").append(i++).append(": ").append sb.append("Case ").append(i++).append(": ") sb.append("Case ").append(i++).append sb.append("Case ").append(i++) sb.append("Case ").append sb.append("Case ") sb.append sb "Case " i++ i ": " s return sb.toString(); sb.toString() sb.toString sb String data data protected static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    } readAll {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    } InputStreamReader r = null; r null BufferedReader br = null; br null try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        } IOException e {
            throw new RuntimeException(e);
        } throw new RuntimeException(e); new RuntimeException(e) {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        } if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            } br != null br null {
                try {
                    br.close();
                } catch (IOException e) {
                }
            } try {
                    br.close();
                } catch (IOException e) {
                } catch (IOException e) {
                } IOException e {
                } {
                    br.close();
                } br.close() br.close br if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            } r != null r null {
                try {
                    r.close();
                } catch (IOException e) {
                }
            } try {
                    r.close();
                } catch (IOException e) {
                } catch (IOException e) {
                } IOException e {
                } {
                    r.close();
                } r.close() r.close r {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } r = new InputStreamReader(is) r new InputStreamReader(is) br = new BufferedReader(r) br new BufferedReader(r) StringBuilder sb = new StringBuilder(); sb new StringBuilder() String s; s while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            } (s = br.readLine()) != null (s = br.readLine()) s br.readLine() br.readLine br null {
                sb.append(s).append('\n');
            } sb.append(s).append('\n') sb.append(s).append sb.append(s) sb.append sb s '\n' return sb.toString(); sb.toString() sb.toString sb InputStream is is public class Main {

    private static final String LINE_SEPARATOR = System.getProperty("line.separator");

    public static void main(String[] args) {
        System.out.println(process(readAll(System.in)));
    }

    protected static String process(String data) {
        final String[] split = data.split("\\n");

        int i = 1;
        StringBuilder sb = new StringBuilder();
        for (String s : split) {
            if ("0".equals(s)) {
                break;
            }
            if (sb.length() > 0) {
                sb.append(LINE_SEPARATOR);
            }
            sb.append("Case ").append(i++).append(": ").append(s);
        }

        return sb.toString();
    }

    protected static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }
} public class Main {

    private static final String LINE_SEPARATOR = System.getProperty("line.separator");

    public static void main(String[] args) {
        System.out.println(process(readAll(System.in)));
    }

    protected static String process(String data) {
        final String[] split = data.split("\\n");

        int i = 1;
        StringBuilder sb = new StringBuilder();
        for (String s : split) {
            if ("0".equals(s)) {
                break;
            }
            if (sb.length() > 0) {
                sb.append(LINE_SEPARATOR);
            }
            sb.append("Case ").append(i++).append(": ").append(s);
        }

        return sb.toString();
    }

    protected static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class Main {

    private static final String LINE_SEPARATOR = System.getProperty("line.separator");

    public static void main(String[] args) {
        System.out.println(process(readAll(System.in)));
    }

    protected static String process(String data) {
        final String[] split = data.split("\\n");

        int i = 1;
        StringBuilder sb = new StringBuilder();
        for (String s : split) {
            if ("0".equals(s)) {
                break;
            }
            if (sb.length() > 0) {
                sb.append(LINE_SEPARATOR);
            }
            sb.append("Case ").append(i++).append(": ").append(s);
        }

        return sb.toString();
    }

    protected static String readAll(InputStream is) {
        InputStreamReader r = null;
        BufferedReader br = null;

        try {
            r = new InputStreamReader(is);
            br = new BufferedReader(r);
            StringBuilder sb = new StringBuilder();
            String s;

            while ((s = br.readLine()) != null) {
                sb.append(s).append('\n');
            }

            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (IOException e) {
                }
            }
            if (r != null) {
                try {
                    r.close();
                } catch (IOException e) {
                }
            }
        }
    }
}