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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: D = None
        self.u: G = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: I = None
        self.q: I = None
        self.r: H = None
        self.w: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: D = None
        self.u: G = None
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: I = None
        self.q: I = None
        self.r: H = None
        self.w: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: A = None
        self.txt = txt

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

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

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

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