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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: F = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: D = None
        self.o: G = None
        self.v: I = None
        self.r: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: J = None
        self.x: G = None
        self.r: B = None
        self.txt = txt

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

e = A("e")
b = B("b")
h = C("h")
c = D("c")
n = E("n")
j = F("j")
l = G("l")
d = H("d")
k = I("k")
a = J("a")

e.w = n
e.o = n
e.v = c
e.r = c
e.s = b
e.t = d
e.x = j
e.z = j
e.q = k
e.p = k
b.z = h
b.p = l
b.x = d
h.s = e
c.t = k
c.o = k
c.w = j
n.w = j
n.o = l
j.s = d
j.w = c
j.r = c
j.o = l
j.v = k
l.p = b
l.u = d
l.s = n
d.z = l
d.q = e
d.x = n
k.o = j
k.v = a
k.x = l
k.r = b
a.w = h
a.z = l
a.p = e
assert h.s.t.z.p.x.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.s: B = None
        self.t: H = None
        self.x: F = None
        self.z: F = None
        self.q: I = None
        self.r: D = None
        self.p: I = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: F = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: D = None
        self.o: G = None
        self.v: I = None
        self.r: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: J = None
        self.x: G = None
        self.r: B = None
        self.txt = txt

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

e = A("e")
b = B("b")
h = C("h")
c = D("c")
n = E("n")
j = F("j")
l = G("l")
d = H("d")
k = I("k")
a = J("a")

e.w = n
e.o = n
e.v = c
e.r = c
e.s = b
e.t = d
e.x = j
e.z = j
e.q = k
e.p = k
b.z = h
b.p = l
b.x = d
h.s = e
c.t = k
c.o = k
c.w = j
n.w = j
n.o = l
j.s = d
j.w = c
j.r = c
j.o = l
j.v = k
l.p = b
l.u = d
l.s = n
d.z = l
d.q = e
d.x = n
k.o = j
k.v = a
k.x = l
k.r = b
a.w = h
a.z = l
a.p = e
assert h.s.t.z.p.x.q.txt == "e"