class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: H = None
        self.v: D = None
        self.u: G = None
        self.r: C = None
        self.z: E = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: I = None
        self.v: I = None
        self.y: B = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: A = None
        self.q: J = None
        self.z: A = None
        self.t: I = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: I = None
        self.t: B = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: H = None
        self.q: H = None
        self.u: G = None
        self.s: J = None
        self.r: F = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: E = None
        self.t: G = None
        self.s: F = None
        self.r: D = None
        self.z: F = None
        self.w: B = None
        self.u: F = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: I = None
        self.v: I = None
        self.y: B = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: A = None
        self.q: J = None
        self.z: A = None
        self.t: I = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: I = None
        self.t: B = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: H = None
        self.q: H = None
        self.u: G = None
        self.s: J = None
        self.r: F = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: E = None
        self.t: G = None
        self.s: F = None
        self.r: D = None
        self.z: F = None
        self.w: B = None
        self.u: F = None
        self.o: F = None
        self.txt = txt

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

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