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

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: E = None
        self.q: D = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.p: G = None
        self.y: B = None
        self.u: B = None
        self.v: D = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: H = None
        self.v: C = None
        self.w: H = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: E = None
        self.q: D = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.p: G = None
        self.y: B = None
        self.u: B = None
        self.v: D = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: H = None
        self.v: C = None
        self.w: H = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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