class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: C = None
        self.z: D = None
        self.u: D = None
        self.r: D = None
        self.v: H = None
        self.s: B = None
        self.t: E = None
        self.p: B = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.p: J = None
        self.v: E = None
        self.y: C = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: E = None
        self.v: H = None
        self.w: G = None
        self.z: A = None
        self.p: H = None
        self.o: A = None
        self.x: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: H = None
        self.u: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: E = None
        self.x: D = None
        self.s: D = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.p: J = None
        self.v: E = None
        self.y: C = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: E = None
        self.v: H = None
        self.w: G = None
        self.z: A = None
        self.p: H = None
        self.o: A = None
        self.x: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: H = None
        self.u: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: E = None
        self.x: D = None
        self.s: D = None
        self.u: D = None
        self.txt = txt

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

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

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

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