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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: F = None
        self.q: C = None
        self.o: E = None
        self.w: J = None
        self.s: A = None
        self.x: C = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: G = None
        self.w: I = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: F = None
        self.s: A = None
        self.u: C = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: B = None
        self.s: G = None
        self.z: C = None
        self.o: H = None
        self.y: H = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: F = None
        self.p: D = None
        self.r: F = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: F = None
        self.q: C = None
        self.o: E = None
        self.w: J = None
        self.s: A = None
        self.x: C = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: G = None
        self.w: I = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: F = None
        self.s: A = None
        self.u: C = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: E = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: B = None
        self.s: G = None
        self.z: C = None
        self.o: H = None
        self.y: H = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: F = None
        self.p: D = None
        self.r: F = None
        self.w: F = None
        self.txt = txt

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

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