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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.r: G = None
        self.w: H = None
        self.q: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: A = None
        self.t: F = None
        self.s: I = None
        self.u: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.p: F = None
        self.t: A = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: D = None
        self.r: G = None
        self.w: H = None
        self.q: D = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: A = None
        self.t: F = None
        self.s: I = None
        self.u: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.p: F = None
        self.t: A = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: B = None
        self.txt = txt

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

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