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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: A = None
        self.v: A = None
        self.u: D = None
        self.x: H = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: I = None
        self.v: J = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: B = None
        self.y: I = None
        self.s: D = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: A = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: B = None
        self.s: J = None
        self.p: J = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: A = None
        self.v: A = None
        self.u: D = None
        self.x: H = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: I = None
        self.v: J = None
        self.w: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: B = None
        self.y: I = None
        self.s: D = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: A = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: B = None
        self.s: J = None
        self.p: J = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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