class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: J = None
        self.y: C = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: I = None
        self.v: H = None
        self.w: E = None
        self.x: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.z: H = None
        self.p: C = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: I = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.r: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.z: C = None
        self.r: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: I = None
        self.v: H = None
        self.w: E = None
        self.x: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.z: H = None
        self.p: C = None
        self.t: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: I = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: F = None
        self.r: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.z: C = None
        self.r: H = None
        self.txt = txt

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

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