class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: C = None
        self.txt = txt

m = A("m")
g = B("g")
n = C("n")
i = B("i")
e = B("e")
b = A("b")
l = C("l")

m.q = g
m.s = l
m.u = n
g.y = e
g.t = n
n.p = l
n.x = l
i.y = e
i.t = l
e.y = g
e.t = l
b.q = e
b.s = l
b.u = l
l.p = n
l.x = n
assert b.q.y.y.y.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: C = None
        self.txt = txt

m = A("m")
g = B("g")
n = C("n")
i = B("i")
e = B("e")
b = A("b")
l = C("l")

m.q = g
m.s = l
m.u = n
g.y = e
g.t = n
n.p = l
n.x = l
i.y = e
i.t = l
e.y = g
e.t = l
b.q = e
b.s = l
b.u = l
l.p = n
l.x = n
assert b.q.y.y.y.t.x.txt == "l"