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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: D = None
        self.p: G = None
        self.w: F = None
        self.t: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: B = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: D = None
        self.p: G = None
        self.w: F = None
        self.t: H = None
        self.txt = txt

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

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