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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: J = None
        self.s: I = None
        self.t: I = None
        self.v: B = None
        self.z: F = None
        self.y: E = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: C = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: I = None
        self.s: G = None
        self.y: B = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

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

i = A("i")
f = B("f")
n = C("n")
d = D("d")
g = E("g")
c = F("c")
a = G("a")
e = H("e")
b = I("b")
m = J("m")

i.z = m
i.y = b
i.u = n
i.s = n
i.t = d
i.v = e
f.t = g
f.w = g
n.o = c
n.z = c
n.w = m
n.p = m
n.s = b
n.t = b
n.v = f
n.y = g
d.t = c
g.x = m
g.r = n
g.z = f
g.t = f
c.u = m
a.y = e
a.w = e
a.p = b
a.u = d
a.t = d
a.s = i
a.q = i
e.x = n
e.w = b
e.s = a
e.y = f
e.q = d
e.p = d
b.p = n
b.w = e
b.x = i
b.o = f
m.p = e
m.w = f
m.s = f
m.x = n
m.v = g
m.z = b
m.t = c
m.y = i
assert m.x.y.r.p.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: I = None
        self.u: C = None
        self.t: D = None
        self.s: C = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: J = None
        self.s: I = None
        self.t: I = None
        self.v: B = None
        self.z: F = None
        self.y: E = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: J = None
        self.r: C = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: I = None
        self.s: G = None
        self.y: B = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

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

i = A("i")
f = B("f")
n = C("n")
d = D("d")
g = E("g")
c = F("c")
a = G("a")
e = H("e")
b = I("b")
m = J("m")

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