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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: D = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: G = None
        self.p: C = None
        self.w: A = None
        self.t: G = None
        self.r: C = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: D = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: G = None
        self.p: C = None
        self.w: A = None
        self.t: G = None
        self.r: C = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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