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

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

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

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

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

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

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

e = A("e")
d = B("d")
m = C("m")
j = D("j")
f = E("f")
i = F("i")
b = G("b")
h = F("h")
k = E("k")
l = G("l")

e.x = f
e.y = h
e.o = m
e.w = k
e.z = b
d.t = j
d.u = i
d.p = h
m.y = e
j.w = d
j.t = d
j.x = i
j.z = h
j.v = m
f.w = m
f.q = m
f.y = m
f.u = m
f.v = i
f.x = h
f.z = e
i.o = h
b.p = m
b.o = h
b.q = j
b.w = d
b.x = k
b.s = l
h.o = i
k.w = m
k.q = m
k.y = m
k.u = m
k.v = h
k.x = i
k.z = e
l.p = m
l.o = i
l.q = j
l.w = d
l.x = k
l.s = b
assert l.q.z.o.o.o.o.o.o.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: F = None
        self.o: C = None
        self.w: E = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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

e = A("e")
d = B("d")
m = C("m")
j = D("j")
f = E("f")
i = F("i")
b = G("b")
h = F("h")
k = E("k")
l = G("l")

e.x = f
e.y = h
e.o = m
e.w = k
e.z = b
d.t = j
d.u = i
d.p = h
m.y = e
j.w = d
j.t = d
j.x = i
j.z = h
j.v = m
f.w = m
f.q = m
f.y = m
f.u = m
f.v = i
f.x = h
f.z = e
i.o = h
b.p = m
b.o = h
b.q = j
b.w = d
b.x = k
b.s = l
h.o = i
k.w = m
k.q = m
k.y = m
k.u = m
k.v = h
k.x = i
k.z = e
l.p = m
l.o = i
l.q = j
l.w = d
l.x = k
l.s = b
assert l.q.z.o.o.o.o.o.o.o.o.txt == "h"