class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: F = None
        self.v: F = None
        self.q: E = None
        self.u: H = None
        self.x: C = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: E = None
        self.o: G = None
        self.s: H = None
        self.t: H = None
        self.u: E = None
        self.v: H = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: A = None
        self.t: E = None
        self.q: F = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: E = None
        self.o: G = None
        self.s: H = None
        self.t: H = None
        self.u: E = None
        self.v: H = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: A = None
        self.t: E = None
        self.q: F = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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