class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.r: E = None
        self.t: I = None
        self.x: J = None
        self.u: D = None
        self.s: G = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.u: C = None
        self.y: B = None
        self.v: F = None
        self.x: E = None
        self.z: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.u: C = None
        self.y: B = None
        self.v: F = None
        self.x: E = None
        self.z: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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