class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: B = None
        self.x: E = None
        self.q: B = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: E = None
        self.v: B = None
        self.w: D = None
        self.s: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: D = None
        self.x: C = None
        self.w: A = None
        self.z: D = None
        self.txt = txt

b = A("b")
c = B("c")
g = C("g")
e = D("e")
a = E("a")
d = F("d")
i = C("i")
j = A("j")
n = E("n")
l = B("l")

b.t = j
b.u = e
c.x = g
c.w = e
g.p = e
e.t = c
e.z = l
e.q = l
e.x = a
e.w = a
a.y = e
a.w = e
a.x = e
a.q = n
a.v = c
a.s = c
d.r = c
d.t = e
d.z = e
d.x = g
d.w = b
i.p = e
j.t = b
j.u = e
n.y = e
n.w = e
n.x = e
n.q = a
n.v = c
n.s = c
l.x = i
l.w = e
assert c.x.p.t.x.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: B = None
        self.x: E = None
        self.q: B = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: E = None
        self.v: B = None
        self.w: D = None
        self.s: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: D = None
        self.x: C = None
        self.w: A = None
        self.z: D = None
        self.txt = txt

b = A("b")
c = B("c")
g = C("g")
e = D("e")
a = E("a")
d = F("d")
i = C("i")
j = A("j")
n = E("n")
l = B("l")

b.t = j
b.u = e
c.x = g
c.w = e
g.p = e
e.t = c
e.z = l
e.q = l
e.x = a
e.w = a
a.y = e
a.w = e
a.x = e
a.q = n
a.v = c
a.s = c
d.r = c
d.t = e
d.z = e
d.x = g
d.w = b
i.p = e
j.t = b
j.u = e
n.y = e
n.w = e
n.x = e
n.q = a
n.v = c
n.s = c
l.x = i
l.w = e
assert c.x.p.t.x.p.x.txt == "a"