class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: B = None
        self.y: B = None
        self.v: C = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.p: B = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: B = None
        self.p: B = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

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