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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: J = None
        self.v: I = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: B = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: C = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

d = A("d")
i = B("i")
l = C("l")
a = D("a")
h = E("h")
k = F("k")
b = G("b")
n = H("n")
e = I("e")
j = J("j")

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: J = None
        self.v: I = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: B = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.r: C = None
        self.z: B = None
        self.t: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

d = A("d")
i = B("i")
l = C("l")
a = D("a")
h = E("h")
k = F("k")
b = G("b")
n = H("n")
e = I("e")
j = J("j")

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