class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: C = None
        self.z: B = None
        self.txt = txt

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

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

l.z = i
n.x = e
n.p = l
n.w = l
n.r = c
n.v = a
n.y = a
j.q = a
j.x = c
j.o = e
a.o = i
a.w = j
a.v = j
a.y = m
c.q = e
c.z = l
c.r = j
c.v = j
c.x = i
c.y = m
c.w = m
e.u = j
e.x = j
e.z = n
m.q = e
m.p = e
m.y = l
m.r = c
m.x = i
m.s = a
i.x = e
i.p = l
i.w = l
i.r = c
i.v = a
i.y = a
assert c.q.z.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: C = None
        self.z: B = None
        self.txt = txt

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

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

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