class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: G = None
        self.r: E = None
        self.p: B = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: F = None
        self.s: F = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: H = None
        self.x: F = None
        self.z: H = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.p: D = None
        self.y: B = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.o: B = None
        self.s: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.z: G = None
        self.p: C = None
        self.x: A = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

g = A("g")
m = B("m")
e = C("e")
l = D("l")
j = E("j")
a = F("a")
b = G("b")
f = H("f")
c = C("c")

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: F = None
        self.s: F = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: H = None
        self.x: F = None
        self.z: H = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.p: D = None
        self.y: B = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.o: B = None
        self.s: D = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.z: G = None
        self.p: C = None
        self.x: A = None
        self.s: F = None
        self.q: D = None
        self.txt = txt

g = A("g")
m = B("m")
e = C("e")
l = D("l")
j = E("j")
a = F("a")
b = G("b")
f = H("f")
c = C("c")

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