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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: A = None
        self.y: D = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: G = None
        self.w: F = None
        self.r: E = None
        self.txt = txt

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

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

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

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

i.x = c
i.q = j
i.w = e
i.p = l
k.r = i
k.w = i
k.y = j
k.u = j
k.p = a
a.x = e
a.v = j
j.o = l
j.w = l
j.s = b
j.r = c
c.w = i
c.x = a
c.y = a
c.u = a
c.z = a
c.v = e
c.q = e
l.q = d
b.u = d
b.y = d
b.x = l
d.u = b
d.y = b
d.x = l
e.w = i
e.x = a
e.y = a
e.u = a
e.z = a
e.v = c
e.q = c
assert l.q.x.q.x.q.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: D = None
        self.w: E = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: A = None
        self.y: D = None
        self.u: D = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: G = None
        self.w: F = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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