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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: G = None
        self.o: G = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: D = None
        self.x: H = None
        self.txt = txt

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

j = A("j")
i = B("i")
e = C("e")
c = D("c")
b = E("b")
h = F("h")
n = G("n")
m = H("m")
d = A("d")

j.w = i
j.p = h
j.y = n
j.z = n
i.y = m
i.s = m
i.r = m
i.w = h
i.t = c
i.p = c
i.q = n
i.o = n
e.r = c
e.s = h
e.z = j
e.v = i
e.t = b
c.q = e
c.x = n
c.o = n
c.r = h
b.y = i
b.s = n
h.y = j
h.s = e
h.q = e
h.o = c
h.w = m
n.y = m
n.x = m
n.r = c
m.w = d
m.p = d
m.x = d
m.z = e
m.r = i
m.u = c
d.w = i
d.p = h
d.y = n
d.z = n
assert i.q.r.o.y.z.t.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: F = None
        self.y: G = None
        self.z: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: G = None
        self.o: G = None
        self.r: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: D = None
        self.x: H = None
        self.txt = txt

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

j = A("j")
i = B("i")
e = C("e")
c = D("c")
b = E("b")
h = F("h")
n = G("n")
m = H("m")
d = A("d")

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