class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: A = None
        self.o: F = None
        self.u: B = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: D = None
        self.t: B = None
        self.u: B = None
        self.v: G = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: D = None
        self.t: B = None
        self.u: B = None
        self.v: G = None
        self.o: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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