class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: F = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: F = None
        self.s: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: A = None
        self.txt = txt

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

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