class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: F = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: J = None
        self.z: H = None
        self.y: F = None
        self.o: C = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: A = None
        self.w: H = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: I = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: B = None
        self.q: D = None
        self.u: D = None
        self.r: E = None
        self.v: D = None
        self.z: G = None
        self.p: I = None
        self.t: E = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.w: J = None
        self.u: A = None
        self.p: D = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: D = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: J = None
        self.z: H = None
        self.y: F = None
        self.o: C = None
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: J = None
        self.u: A = None
        self.w: H = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: I = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: B = None
        self.q: D = None
        self.u: D = None
        self.r: E = None
        self.v: D = None
        self.z: G = None
        self.p: I = None
        self.t: E = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.w: J = None
        self.u: A = None
        self.p: D = None
        self.t: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: D = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

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

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