class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: J = None
        self.z: G = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: J = None
        self.t: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: D = None
        self.x: J = None
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: J = None
        self.p: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: I = None
        self.z: D = None
        self.w: F = None
        self.o: I = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: J = None
        self.t: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: D = None
        self.x: J = None
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: J = None
        self.p: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: I = None
        self.z: D = None
        self.w: F = None
        self.o: I = None
        self.r: C = None
        self.txt = txt

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

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