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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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