import java.io.*;
import java.util.*;

/**
* ACM Problem #11190 (Power of Matrix)
*
* @author Felix Dietrich
* @version 1.0, 28/07/09
*
* Status : Accepted
* Runtime: 2.960
*/

class Main
{

static BufferedReader reader;
static BufferedReader outputReader;
static boolean useTestData = false;
static String testData = "test.txt";

private static String readline(int maxLg) throws IOException
{
if (useTestData)
return reader.readLine();

byte lin[] = new byte[maxLg];
int lg = 0, car = -1;

try
{
while (lg < maxLg)
{
car = System.in.read();
if ((car < 0) || (car == '\n'))
break;
lin[lg++] += car;
}
}
catch (IOException e)
{
return (null);
}

if ((car < 0) && (lg == 0))
return (null); // eof
return (new String(lin, 0, lg));

}

public static void main(String args[]) throws IOException
{
String input;

if (useTestData)
{
reader = new BufferedReader(new FileReader(testData));
// outputReader = new BufferedReader(new FileReader("output.txt"));
}
else
reader = new BufferedReader(new InputStreamReader(System.in));

boolean firstline = true;

while ((input = readline(255)) != null)
{
if (input.length() < 2)
continue;
if (!firstline)
{
System.out.println();
}
else
firstline = false;
if (work(input.trim()) == false) // the true entry point
return;
}
}

// / Code starts here
static int casenumber = 1;

private static class BigDouble
{
double mantissa;
int exponent;

public BigDouble(double mantissa2, int j)
{
set(mantissa2,j);
}

public BigDouble()
{
set(0,0);
}

public void add(BigDouble d)
{
double man = d.mantissa;
if(this.exponent > d.exponent)
{
int expshift = this.exponent - d.exponent;
man /= Math.pow(10, expshift);

this.mantissa += man;
}
else
{
int expshift = d.exponent - this.exponent;
this.mantissa /= Math.pow(10, expshift);

this.exponent = d.exponent;
this.mantissa += d.mantissa;
}

normalize();
}

public void mult(BigDouble d)
{
this.mantissa *= d.mantissa;
this.exponent += d.exponent;

normalize();
}

public void normalize()
{
if(this.mantissa >= 10)
{
int l = (int) Math.floor(Math.log10(mantissa));
this.exponent += l;
this.mantissa /= Math.pow(10, l);
}
}

public void pow(int k)
{
if(k==1)
return;

List<BigDouble> remain = new ArrayList<BigDouble>();
int remaining = 0;

while(k > 1)
{
//even
if((k&1)==0)
{
this.mult(this);
k/=2;
}
else
{
k--;
remain.add(new BigDouble(this.mantissa,this.exponent));
remaining++;
}
}
for(BigDouble bd: remain)
{
this.mult(bd);
remaining--;
}
}

private void set(double mantissa2, int j)
{
mantissa = mantissa2;
exponent = j;
normalize();
}

@Override
public String toString()
{
// normalize();
Locale.setDefault(Locale.ENGLISH);
return String.format("%06fe%010d", mantissa/10, exponent+1);
}
}

private static boolean work(String trim)
{
if (trim.length() < 5)
return true;

StringTokenizer st = new StringTokenizer(trim);

int l = Integer.parseInt(st.nextToken());
int h = Integer.parseInt(st.nextToken());
int k = Integer.parseInt(st.nextToken());

if (l == -1 && h == -1 && k == -1)
return false;

System.out.print(String.format("Case %04d: %s", casenumber++, getResult(l, h, k)));
return true;
}

private static BigDouble getResult(int l, int h, int k)
{
BigDouble d;
BigDouble result = new BigDouble();

for(int i=l; i<=h; i++)
{
d = new BigDouble(i,0);
d.pow(k);
result.add(d);
}
return result;
}
}