using System.Collections.Generic;
public class StoryGenerator
private Dictionary<string, string> storyTemplates = new Dictionary<string, string>
{"boy at a party", "Once upon a time, there was a {0} who went to a party. He had a great time, dancing and laughing with his friends."},
{"girl at a park", "One sunny day, a {0} went to the park. She enjoyed the fresh air and played on the swings."},
{"dog in the garden", "One day, a {0} was playing in the garden. It was chasing butterflies and having a lot of fun."},
{"cat on the roof", "In the quiet town, a {0} was walking on the roof. It was watching the world from above, feeling free and content."},
{"bird in the forest", "Deep in the forest, a {0} was singing. Its song was so beautiful, it echoed through the trees."},
{"fish in the sea", "Under the sea, a {0} was swimming. It was exploring the colorful coral reefs, full of wonder and excitement."},
{"mouse in the house", "In a cozy house, a {0} was sneaking around. It was looking for cheese, moving quietly so as not to wake anyone up."},
{"elephant in the zoo", "At the local zoo, a {0} was taking a bath. It was splashing water around, enjoying the coolness on a hot day."},
{"butterfly in the meadow", "In a sunny meadow, a {0} was fluttering around. It was visiting each flower, spreading pollen and helping the meadow bloom."},
{"bee in the garden", "In a blooming garden, a {0} was buzzing around. It was collecting nectar, working hard to make honey."},
{"squirrel in the park", "In a bustling park, a {0} was hopping around. It was collecting acorns, preparing for the winter."},
public string GenerateStory(string input)
string story = "Sorry, I don't have a story for that scenario.";
foreach (var template in storyTemplates)
if (input.Contains(template.Key))
story = string.Format(template.Value, input);
static void Main(string[] args)
StoryGenerator generator = new StoryGenerator();
Console.WriteLine("Enter a scenario:");
string input = Console.ReadLine();
string story = generator.GenerateStory(input);
Console.WriteLine(story);