class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: B = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: A = None
        self.r: F = None
        self.z: E = None
        self.s: G = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.o: F = None
        self.p: B = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: A = None
        self.r: F = None
        self.z: E = None
        self.s: G = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.o: F = None
        self.p: B = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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