class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: B = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: B = None
        self.p: A = None
        self.x: H = None
        self.z: G = None
        self.q: E = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.z: G = None
        self.w: E = None
        self.y: A = None
        self.x: B = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: G = None
        self.t: D = None
        self.w: F = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: F = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: B = None
        self.p: A = None
        self.x: H = None
        self.z: G = None
        self.q: E = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.z: G = None
        self.w: E = None
        self.y: A = None
        self.x: B = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: G = None
        self.t: D = None
        self.w: F = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: F = None
        self.q: A = None
        self.txt = txt

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

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