class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: C = None
        self.y: E = None
        self.r: H = None
        self.o: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: D = None
        self.x: I = None
        self.o: A = None
        self.y: D = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: E = None
        self.x: I = None
        self.p: I = None
        self.u: G = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: B = None
        self.z: B = None
        self.t: A = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: A = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: I = None
        self.t: J = None
        self.x: E = None
        self.r: G = None
        self.s: C = None
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: D = None
        self.x: I = None
        self.o: A = None
        self.y: D = None
        self.r: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: E = None
        self.x: I = None
        self.p: I = None
        self.u: G = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: B = None
        self.z: B = None
        self.t: A = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: A = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: I = None
        self.t: J = None
        self.x: E = None
        self.r: G = None
        self.s: C = None
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: H = None
        self.txt = txt

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

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