class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: F = None
        self.t: B = None
        self.u: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: H = None
        self.u: I = None
        self.t: H = None
        self.x: B = None
        self.o: F = None
        self.v: D = None
        self.q: A = None
        self.w: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: H = None
        self.w: B = None
        self.p: J = None
        self.o: G = None
        self.v: D = None
        self.x: I = None
        self.q: H = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: B = None
        self.v: I = None
        self.p: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: A = None
        self.w: A = None
        self.o: A = None
        self.z: A = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: A = None
        self.y: C = None
        self.v: H = None
        self.o: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: H = None
        self.u: I = None
        self.t: H = None
        self.x: B = None
        self.o: F = None
        self.v: D = None
        self.q: A = None
        self.w: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: H = None
        self.w: B = None
        self.p: J = None
        self.o: G = None
        self.v: D = None
        self.x: I = None
        self.q: H = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: B = None
        self.v: I = None
        self.p: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: A = None
        self.w: A = None
        self.o: A = None
        self.z: A = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: A = None
        self.y: C = None
        self.v: H = None
        self.o: A = None
        self.txt = txt

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

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