class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: I = None
        self.r: I = None
        self.q: B = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: H = None
        self.w: A = None
        self.t: B = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: G = None
        self.s: E = None
        self.u: I = None
        self.o: G = None
        self.w: E = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.r: G = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: F = None
        self.p: H = None
        self.s: G = None
        self.v: H = None
        self.x: H = None
        self.q: H = None
        self.r: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: H = None
        self.w: A = None
        self.t: B = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: G = None
        self.s: E = None
        self.u: I = None
        self.o: G = None
        self.w: E = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.r: G = None
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: F = None
        self.p: H = None
        self.s: G = None
        self.v: H = None
        self.x: H = None
        self.q: H = None
        self.r: A = None
        self.txt = txt

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

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