I've seen a lot of people start with cheap guitars, and the difference between a decent model and a terrible one is huge, especially for your fingers at first. With 300 euros you've already got options that sound good without being complete garbage. The most important thing is that the action - that's the string height - is set up properly. A cheap guitar with the action set right will hurt less than a good one with strings as high as a fence.
Check out brands like Yamaha and Fender in their entry-level range, like the Yamaha C40 or the Fender FA-100. Both are comfortably under 300 and they're built to last. If you find something a bit older from these lines, it often costs even less and works just as well. Avoid guitars that cost like 50-80 euros: yeah, you save money, but they usually sound so bad that by the third lesson you've quit.
When you try them out, do two things: listen to whether the sound is at least decent (clear, not dead), and check how the strings sit as they run up toward the body. If they dig into your fingertips after just a few minutes, that's not the right choice. A shop that knows what they're doing can adjust the action before selling it to you, so don't hesitate to ask.