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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.t: A = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.t: A = None
        self.z: G = None
        self.txt = txt

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

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

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

d.o = b
d.q = b
d.p = j
d.u = l
d.w = e
d.r = a
l.v = j
b.q = i
b.u = k
k.x = d
k.t = e
k.u = l
e.v = a
e.z = a
e.p = b
e.t = d
m.v = n
n.y = d
n.x = l
n.u = m
n.v = m
n.o = b
n.p = k
j.v = n
j.z = n
j.p = b
j.t = d
i.q = b
i.u = k
a.y = d
a.x = l
a.u = m
a.v = m
a.o = i
a.p = k
assert j.z.y.w.txt == "e"