class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.r: I = None
        self.s: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: F = None
        self.x: F = None
        self.o: D = None
        self.v: H = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.r: I = None
        self.s: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: F = None
        self.x: F = None
        self.o: D = None
        self.v: H = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

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

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