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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: G = None
        self.w: I = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: I = None
        self.q: B = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: G = None
        self.w: I = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: I = None
        self.q: B = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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