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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: C = None
        self.q: C = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: G = None
        self.q: C = None
        self.y: J = None
        self.r: A = None
        self.v: H = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: F = None
        self.o: A = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: C = None
        self.q: C = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: G = None
        self.q: C = None
        self.y: J = None
        self.r: A = None
        self.v: H = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: F = None
        self.o: A = None
        self.y: B = None
        self.txt = txt

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

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