class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: E = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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