class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: H = None
        self.q: C = None
        self.s: D = None
        self.v: G = None
        self.w: H = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: G = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: F = None
        self.t: C = None
        self.y: F = None
        self.q: B = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: E = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: G = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: F = None
        self.t: C = None
        self.y: F = None
        self.q: B = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: E = None
        self.p: D = None
        self.txt = txt

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

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