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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: D = None
        self.p: E = None
        self.y: A = None
        self.u: I = None
        self.v: G = None
        self.q: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: I = None
        self.p: H = None
        self.o: I = None
        self.v: G = None
        self.r: I = None
        self.x: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: J = None
        self.q: C = None
        self.u: H = None
        self.x: A = None
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.s: C = None
        self.o: D = None
        self.z: F = None
        self.t: F = None
        self.r: A = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: H = None
        self.q: H = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: H = None
        self.r: C = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: D = None
        self.p: E = None
        self.y: A = None
        self.u: I = None
        self.v: G = None
        self.q: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: I = None
        self.p: H = None
        self.o: I = None
        self.v: G = None
        self.r: I = None
        self.x: E = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: J = None
        self.q: C = None
        self.u: H = None
        self.x: A = None
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.s: C = None
        self.o: D = None
        self.z: F = None
        self.t: F = None
        self.r: A = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: H = None
        self.q: H = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: H = None
        self.r: C = None
        self.s: C = None
        self.txt = txt

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

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