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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.y: C = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: F = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

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

k = A("k")
n = B("n")
j = C("j")
l = D("l")
b = E("b")
g = F("g")
f = G("f")
a = H("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: F = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.y: C = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: F = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

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

k = A("k")
n = B("n")
j = C("j")
l = D("l")
b = E("b")
g = F("g")
f = G("f")
a = H("a")

k.y = l
k.t = b
n.o = b
n.y = f
n.w = l
n.q = k
n.r = a
n.t = a
n.p = a
n.u = a
j.s = g
j.z = k
j.u = k
j.t = a
j.w = a
j.p = l
j.v = f
l.z = g
l.s = g
l.p = k
b.o = n
g.p = n
g.x = k
g.y = j
g.u = j
f.y = k
f.p = g
f.s = n
f.t = j
a.x = f
a.o = b
a.w = b
a.q = b
a.s = l
a.v = g
a.r = k
assert b.o.w.p.t.o.txt == "n"