class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: J = None
        self.z: C = None
        self.r: G = None
        self.q: E = None
        self.u: H = None
        self.o: A = None
        self.y: J = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: G = None
        self.s: I = None
        self.o: D = None
        self.u: J = None
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: A = None
        self.u: F = None
        self.t: F = None
        self.q: F = None
        self.o: D = None
        self.y: F = None
        self.x: H = None
        self.txt = txt

c = A("c")
i = B("i")
d = C("d")
n = D("n")
m = E("m")
l = F("l")
e = G("e")
h = H("h")
j = I("j")
a = J("a")

c.v = l
c.u = e
i.t = n
i.x = j
d.s = h
n.t = i
n.s = a
n.y = a
n.z = d
n.r = e
n.q = m
n.u = h
n.o = c
n.p = c
m.r = e
m.v = d
m.x = c
l.x = h
l.q = e
l.s = j
l.o = n
l.u = a
l.v = m
e.s = a
e.q = d
e.v = n
h.o = m
j.v = l
j.o = l
a.v = n
a.o = n
a.w = c
a.u = l
a.t = l
a.q = l
a.y = l
a.x = h
assert e.q.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: J = None
        self.z: C = None
        self.r: G = None
        self.q: E = None
        self.u: H = None
        self.o: A = None
        self.y: J = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: G = None
        self.s: I = None
        self.o: D = None
        self.u: J = None
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: A = None
        self.u: F = None
        self.t: F = None
        self.q: F = None
        self.o: D = None
        self.y: F = None
        self.x: H = None
        self.txt = txt

c = A("c")
i = B("i")
d = C("d")
n = D("n")
m = E("m")
l = F("l")
e = G("e")
h = H("h")
j = I("j")
a = J("a")

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