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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: F = None
        self.w: I = None
        self.r: C = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.t: I = None
        self.w: I = None
        self.y: F = None
        self.r: C = None
        self.v: F = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: D = None
        self.o: J = None
        self.z: I = None
        self.s: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.t: A = None
        self.q: G = None
        self.s: D = None
        self.x: A = None
        self.u: C = None
        self.v: A = None
        self.p: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: F = None
        self.w: I = None
        self.r: C = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: F = None
        self.t: I = None
        self.w: I = None
        self.y: F = None
        self.r: C = None
        self.v: F = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: D = None
        self.o: J = None
        self.z: I = None
        self.s: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.t: A = None
        self.q: G = None
        self.s: D = None
        self.x: A = None
        self.u: C = None
        self.v: A = None
        self.p: B = None
        self.txt = txt

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

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

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