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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: I = None
        self.o: A = None
        self.r: J = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: H = None
        self.r: D = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: I = None
        self.o: A = None
        self.r: J = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: H = None
        self.r: D = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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