class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: C = None
        self.r: A = None
        self.x: C = None
        self.s: A = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: C = None
        self.r: A = None
        self.x: C = None
        self.s: A = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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