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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: E = None
        self.z: A = None
        self.q: H = None
        self.o: D = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: C = None
        self.p: H = None
        self.t: H = None
        self.v: F = None
        self.s: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: E = None
        self.z: A = None
        self.q: H = None
        self.o: D = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: C = None
        self.p: H = None
        self.t: H = None
        self.v: F = None
        self.s: F = None
        self.txt = txt

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

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

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