class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: E = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: I = None
        self.v: G = None
        self.r: H = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: I = None
        self.r: E = None
        self.p: H = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.s: G = None
        self.z: F = None
        self.v: F = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: I = None
        self.v: G = None
        self.r: H = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: I = None
        self.r: E = None
        self.p: H = None
        self.u: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.s: G = None
        self.z: F = None
        self.v: F = None
        self.o: D = None
        self.y: B = None
        self.txt = txt

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

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