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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: C = None
        self.q: H = None
        self.u: I = None
        self.o: I = None
        self.v: A = None
        self.r: I = None
        self.z: A = None
        self.x: G = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: B = None
        self.x: D = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: H = None
        self.w: I = None
        self.x: B = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: F = None
        self.u: I = None
        self.t: G = None
        self.q: B = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: C = None
        self.q: H = None
        self.u: I = None
        self.o: I = None
        self.v: A = None
        self.r: I = None
        self.z: A = None
        self.x: G = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: B = None
        self.x: D = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: H = None
        self.w: I = None
        self.x: B = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: F = None
        self.u: I = None
        self.t: G = None
        self.q: B = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

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

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