This problem isn’t with the strings, but with the guitar. Take the guitar that you purchased back to the store that you bought it from and ask for them to take a look at the guitar. If there isn’t any help at the guitar store, look for a luthier.