class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: I = None
        self.y: I = None
        self.v: J = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: A = None
        self.txt = txt

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

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

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

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

d.u = k
d.q = b
d.y = b
d.v = j
d.z = l
n.q = m
n.p = m
n.y = b
n.r = b
n.x = b
n.o = k
n.w = c
n.z = h
n.s = d
c.o = h
h.v = k
h.o = b
h.s = n
h.x = n
h.z = d
h.t = l
h.r = m
h.q = m
l.q = n
l.s = c
m.x = d
i.x = l
i.s = d
k.s = n
k.p = n
k.z = h
k.y = b
b.w = i
b.s = i
b.z = j
b.q = j
b.u = j
b.x = l
b.v = d
b.o = d
b.y = c
j.t = k
j.s = i
j.q = m
assert l.s.o.r.x.txt == "
class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: I = None
        self.y: I = None
        self.v: J = None
        self.z: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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