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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: C = None
        self.u: E = None
        self.x: C = None
        self.s: C = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: C = None
        self.u: E = None
        self.x: C = None
        self.s: C = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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