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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: A = None
        self.y: J = None
        self.r: G = None
        self.x: E = None
        self.o: G = None
        self.w: D = None
        self.t: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: A = None
        self.z: G = None
        self.s: G = None
        self.p: E = None
        self.w: F = None
        self.y: D = None
        self.t: B = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: C = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: H = None
        self.x: J = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: E = None
        self.t: B = None
        self.v: D = None
        self.o: H = None
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.z: A = None
        self.y: J = None
        self.r: G = None
        self.x: E = None
        self.o: G = None
        self.w: D = None
        self.t: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: A = None
        self.z: G = None
        self.s: G = None
        self.p: E = None
        self.w: F = None
        self.y: D = None
        self.t: B = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: C = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: H = None
        self.x: J = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: E = None
        self.t: B = None
        self.v: D = None
        self.o: H = None
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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