class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: C = None
        self.q: D = None
        self.y: B = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: I = None
        self.t: I = None
        self.v: J = None
        self.q: F = None
        self.w: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: J = None
        self.p: F = None
        self.w: C = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: J = None
        self.s: C = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: I = None
        self.p: E = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.p: G = None
        self.t: J = None
        self.y: B = None
        self.v: F = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: B = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: I = None
        self.t: I = None
        self.v: J = None
        self.q: F = None
        self.w: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: J = None
        self.p: F = None
        self.w: C = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: J = None
        self.s: C = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: I = None
        self.p: E = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.p: G = None
        self.t: J = None
        self.y: B = None
        self.v: F = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: B = None
        self.r: E = None
        self.txt = txt

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

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

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