If you search for something in Google and use a word like "running", Google is smart enough to match "run" or "runs" as well. That's because search engines do what's called stemming before matching words.

In English, stemming involves removing common endings from words to produce a base word. It's hard to come up with a complete set of rules that work for all words, but this simplified set does a pretty good job:

If the word starts with a capital letter, output it without changes.
If the word ends in 's', 'ed', or 'ing' remove those letters, but if the resulting stemmed word is only 1 or 2 letters long (e.g. chopping the ing from sing), use the original word.
Your program should read one word of input and print out the corresponding stemmed word. For example:

```none
Enter the word: states
state

```

Another example interaction with your program is:

```none
Enter the word: rowed
row

```

Remember that capitalised words should not be stemmed:

```none
Enter the word: James
James

```

and nor should words that become too short after stemming:

```none
Enter the word: sing
sing

```

Here is the code:

```
word = input("Enter the word:") 
x = 'ing' 
y = 'ed' 
z = 's' 
first = word[:1] 
last = word[-1:] 
uppercase = first.upper 
if word == uppercase: 
 print("")

elif (x in word) == True: 
 word = (word.replace('ing',''))
 print(word)

elif (y in word) == True: 
 word = (word.replace('ed',''))
 print(word)

elif (z in word) == True: 
 word = (word.replace('s',''))
 print(word)

```