class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: F = None
        self.w: F = None
        self.v: C = None
        self.o: H = None
        self.s: F = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: C = None
        self.q: F = None
        self.o: J = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: H = None
        self.r: C = None
        self.z: B = None
        self.p: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: C = None
        self.q: F = None
        self.o: J = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: H = None
        self.r: C = None
        self.z: B = None
        self.p: H = None
        self.txt = txt

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

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

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