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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: G = None
        self.o: H = None
        self.y: B = None
        self.p: F = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: D = None
        self.w: H = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: G = None
        self.o: H = None
        self.y: B = None
        self.p: F = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: D = None
        self.w: H = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: H = None
        self.txt = txt

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

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

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