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

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: A = None
        self.u: A = None
        self.z: J = None
        self.q: E = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: G = None
        self.p: F = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: D = None
        self.v: A = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: B = None
        self.o: I = None
        self.v: C = None
        self.r: A = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: A = None
        self.u: A = None
        self.z: J = None
        self.q: E = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: G = None
        self.p: F = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: D = None
        self.v: A = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: B = None
        self.o: I = None
        self.v: C = None
        self.r: A = None
        self.y: A = None
        self.txt = txt

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

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