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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: D = None
        self.z: G = None
        self.p: C = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: H = None
        self.o: F = None
        self.x: C = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: J = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: G = None
        self.p: C = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: G = None
        self.x: H = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: D = None
        self.z: G = None
        self.p: C = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: H = None
        self.o: F = None
        self.x: C = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: J = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: G = None
        self.p: C = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: G = None
        self.x: H = None
        self.r: E = None
        self.txt = txt

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

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

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