class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: A = None
        self.z: D = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: E = None
        self.u: F = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: F = None
        self.s: E = None
        self.r: E = None
        self.w: G = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: I = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: B = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: I = None
        self.r: C = None
        self.z: I = None
        self.v: C = None
        self.p: E = None
        self.q: B = None
        self.t: A = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: A = None
        self.r: G = None
        self.s: B = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: A = None
        self.r: G = None
        self.t: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: E = None
        self.u: F = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: F = None
        self.s: E = None
        self.r: E = None
        self.w: G = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: I = None
        self.u: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: B = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: I = None
        self.r: C = None
        self.z: I = None
        self.v: C = None
        self.p: E = None
        self.q: B = None
        self.t: A = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: A = None
        self.r: G = None
        self.s: B = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: A = None
        self.r: G = None
        self.t: G = None
        self.txt = txt

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

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