You can sell your home at any time after you buy it. You would only pay a penalty if your mortgage has a pre-payment penalty. You should review your mortgage note and documents to determine if your loan has a pre-payment penalty. Most mortgages do not have a pre-payment penalty but some do.
The other issue to consider is if you can sell your home for more than you bought it less any closing costs and real estate agent commissions. If you are unable to sell your home for more than you bought it for then you may lose all or part of your down payment. For example, if you bought the home for $100,000 and made a 20% down payment ($20,000) but you only sold the home for $95,000 then you would lose $5,000 from your down payment plus any closing costs and commissions on the sale transaction. Hopefully your home has increased in value, even over a month, so you will not lose any money when you sell it.