class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: G = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: D = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: G = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: D = None
        self.z: E = None
        self.txt = txt

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

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