class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: H = None
        self.y: C = None
        self.q: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: A = None
        self.v: H = None
        self.z: G = None
        self.q: H = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: H = None
        self.p: A = None
        self.w: A = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: B = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: A = None
        self.v: H = None
        self.z: G = None
        self.q: H = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: H = None
        self.p: A = None
        self.w: A = None
        self.t: D = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: B = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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