class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: F = None
        self.o: J = None
        self.x: J = None
        self.z: C = None
        self.v: F = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: B = None
        self.p: A = None
        self.o: E = None
        self.q: E = None
        self.t: J = None
        self.r: I = None
        self.v: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: I = None
        self.p: E = None
        self.x: I = None
        self.r: J = None
        self.u: C = None
        self.z: C = None
        self.v: A = None
        self.t: H = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: D = None
        self.q: A = None
        self.w: C = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: B = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: C = None
        self.v: D = None
        self.o: G = None
        self.x: G = None
        self.q: A = None
        self.z: C = None
        self.u: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: B = None
        self.p: A = None
        self.o: E = None
        self.q: E = None
        self.t: J = None
        self.r: I = None
        self.v: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: I = None
        self.p: E = None
        self.x: I = None
        self.r: J = None
        self.u: C = None
        self.z: C = None
        self.v: A = None
        self.t: H = None
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: D = None
        self.q: A = None
        self.w: C = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: B = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: C = None
        self.v: D = None
        self.o: G = None
        self.x: G = None
        self.q: A = None
        self.z: C = None
        self.u: F = None
        self.txt = txt

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

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