class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: J = None
        self.s: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: I = None
        self.r: H = None
        self.t: H = None
        self.w: C = None
        self.s: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: C = None
        self.r: C = None
        self.v: G = None
        self.x: F = None
        self.z: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: H = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: I = None
        self.r: H = None
        self.t: H = None
        self.w: C = None
        self.s: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: C = None
        self.r: C = None
        self.v: G = None
        self.x: F = None
        self.z: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: H = None
        self.q: D = None
        self.txt = txt

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

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