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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: I = None
        self.u: C = None
        self.p: J = None
        self.x: A = None
        self.o: D = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: I = None
        self.u: C = None
        self.p: J = None
        self.x: A = None
        self.o: D = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.q: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: D = None
        self.u: F = None
        self.txt = txt

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

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

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

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