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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: F = None
        self.p: D = None
        self.v: G = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: F = None
        self.p: D = None
        self.v: G = None
        self.txt = txt

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

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

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

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