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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: C = None
        self.y: E = None
        self.u: C = None
        self.r: J = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: C = None
        self.q: G = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: A = None
        self.q: I = None
        self.p: C = None
        self.o: A = None
        self.r: J = None
        self.y: E = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: B = None
        self.q: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: C = None
        self.y: E = None
        self.u: C = None
        self.r: J = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: C = None
        self.q: G = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: A = None
        self.q: I = None
        self.p: C = None
        self.o: A = None
        self.r: J = None
        self.y: E = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: B = None
        self.q: C = None
        self.txt = txt

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

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

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