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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: D = None
        self.z: G = None
        self.r: H = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: F = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: F = None
        self.x: J = None
        self.o: B = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: C = None
        self.y: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: D = None
        self.z: G = None
        self.r: H = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: F = None
        self.u: G = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: F = None
        self.x: J = None
        self.o: B = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: C = None
        self.y: H = None
        self.txt = txt

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

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