///////
//
// Student: Russell Lowke
//     T.F: Francis Crick
// Unit Three, pencil-and-paper - question 5 [worth 2pts],  7/7/2002
//
//  Write a program that will read lines of characters,
//  echoing with the following changes:
//
//  upper-case to lower-case
//  lower-case to upper-case
//  keep non-alphabetic the way they are typed

#include <iostream>
#include <iomanip>

void main()
{
	char c;
	
	cin.unsetf(ios::skipws);		// unset skip whitespace
	
	do {
	
		cin >> c;					// get input from keyboard
		
		// convert upper-case to lower and visa versa
		if (c >= 'A' && c <= 'Z') 
			c += ('a' - 'A');		
		else if (c >= 'a' && c <= 'z')
			c -= ('a' - 'A');
					
		cout << c;
	    	
	} while ( c != '\n' );			// loop until newline
}