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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: B = None
        self.u: J = None
        self.p: A = None
        self.v: H = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: C = None
        self.r: E = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.y: B = None
        self.u: J = None
        self.p: A = None
        self.v: H = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: C = None
        self.r: E = None
        self.s: G = None
        self.txt = txt

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

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