class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: H = None
        self.v: G = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: G = None
        self.p: J = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: D = None
        self.s: G = None
        self.y: A = None
        self.x: D = None
        self.w: B = None
        self.z: E = None
        self.txt = txt

m = A("m")
f = B("f")
g = C("g")
c = D("c")
b = E("b")
a = F("a")
k = G("k")
i = H("i")
n = I("n")
h = J("h")

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: G = None
        self.p: J = None
        self.o: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: D = None
        self.s: G = None
        self.y: A = None
        self.x: D = None
        self.w: B = None
        self.z: E = None
        self.txt = txt

m = A("m")
f = B("f")
g = C("g")
c = D("c")
b = E("b")
a = F("a")
k = G("k")
i = H("i")
n = I("n")
h = J("h")

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