class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: D = None
        self.t: B = None
        self.y: C = None
        self.o: C = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

k.u = a
k.z = d
k.t = l
k.y = c
k.o = c
k.q = i
l.w = i
l.z = i
c.x = a
c.r = a
c.u = l
d.x = a
d.q = a
d.v = l
d.w = l
d.y = c
a.p = k
a.q = l
a.t = l
a.r = c
a.u = i
f.z = k
f.x = l
f.u = c
i.u = d
i.x = d
i.q = c
i.p = c
i.o = k
i.r = f
i.v = l
assert a.r.u.z.v.z.txt == "i"