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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: H = None
        self.t: I = None
        self.w: D = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: B = None
        self.r: B = None
        self.p: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: F = None
        self.y: H = None
        self.s: B = None
        self.q: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: H = None
        self.t: I = None
        self.w: D = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: B = None
        self.r: B = None
        self.p: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: F = None
        self.y: H = None
        self.s: B = None
        self.q: D = None
        self.txt = txt

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

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