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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: B = None
        self.r: B = None
        self.z: F = None
        self.x: A = None
        self.v: A = None
        self.o: D = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: E = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: B = None
        self.r: B = None
        self.z: F = None
        self.x: A = None
        self.v: A = None
        self.o: D = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: E = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.txt = txt

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

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