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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: H = None
        self.o: B = None
        self.q: C = None
        self.t: B = None
        self.s: F = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.z: D = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: C = None
        self.x: H = None
        self.o: F = None
        self.w: B = None
        self.r: A = None
        self.v: F = None
        self.u: C = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: J = None
        self.r: A = None
        self.t: C = None
        self.u: B = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: B = None
        self.s: G = None
        self.o: E = None
        self.p: E = None
        self.q: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: H = None
        self.o: B = None
        self.q: C = None
        self.t: B = None
        self.s: F = None
        self.r: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.z: D = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: C = None
        self.x: H = None
        self.o: F = None
        self.w: B = None
        self.r: A = None
        self.v: F = None
        self.u: C = None
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: J = None
        self.r: A = None
        self.t: C = None
        self.u: B = None
        self.v: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: B = None
        self.s: G = None
        self.o: E = None
        self.p: E = None
        self.q: A = None
        self.txt = txt

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

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

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