class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: G = None
        self.z: B = None
        self.w: D = None
        self.u: C = None
        self.v: D = None
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: A = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: B = None
        self.o: A = None
        self.x: A = None
        self.w: A = None
        self.u: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: E = None
        self.z: E = None
        self.x: B = None
        self.r: E = None
        self.p: F = None
        self.v: B = None
        self.txt = txt

c = A("c")
g = B("g")
a = C("a")
l = D("l")
d = E("d")
f = F("f")
h = G("h")
m = C("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: A = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: B = None
        self.o: A = None
        self.x: A = None
        self.w: A = None
        self.u: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: E = None
        self.z: E = None
        self.x: B = None
        self.r: E = None
        self.p: F = None
        self.v: B = None
        self.txt = txt

c = A("c")
g = B("g")
a = C("a")
l = D("l")
d = E("d")
f = F("f")
h = G("h")
m = C("m")

c.t = m
c.o = h
c.z = g
c.w = l
c.v = l
c.p = l
c.u = a
g.w = l
g.s = c
a.t = g
l.z = c
l.r = c
l.s = m
l.u = a
d.o = h
f.q = m
f.v = g
f.o = c
f.x = c
f.w = c
f.u = d
f.p = l
h.s = l
h.u = d
h.z = d
h.r = d
h.x = g
h.v = g
h.p = f
m.t = g
assert a.t.s.u.txt == "a"