Try below XPath
//*[@class="maintitle"]/*[contains(@class, "main-wrap")]//*[@id="myid"]/*[contains(@class="h1")]//bold
If you need tool that can convert CSS to XPath for you, you can try lxml:
from cssselect import GenericTranslator
from lxml.etree import XPath
css_selector = """[class="maintitle"] > .main-wrap #myid > .h1 bold"""
print(XPath(GenericTranslator().css_to_xpath(css_selector)))
Output (looks weird, but...):
descendant-or-self::*[@class = 'maintitle']/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' main-wrap ')]/descendant-or-self::*/*[@id = 'myid']/*[@class and contains(concat(' ', normalize-space(@class), ' '), ' h1 ')]/descendant-or-self::*/bold
Note that you might also need to add // at the beggining as:
print("//" + str(XPath(GenericTranslator().css_to_xpath(css_selector))))