class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: H = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.q: B = None
        self.s: I = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.v: H = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: A = None
        self.q: A = None
        self.s: E = None
        self.w: G = None
        self.z: A = None
        self.v: A = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: H = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.q: B = None
        self.s: I = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: H = None
        self.v: H = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: A = None
        self.q: A = None
        self.s: E = None
        self.w: G = None
        self.z: A = None
        self.v: A = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: J = None
        self.txt = txt

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

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

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