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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.s: J = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = None
        self.q: C = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: G = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: H = None
        self.s: H = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.s: J = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = None
        self.q: C = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: G = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: H = None
        self.s: H = None
        self.x: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: F = None
        self.txt = txt

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

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