class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: F = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.x: D = None
        self.o: B = None
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: A = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.p: B = None
        self.u: H = None
        self.t: B = None
        self.q: D = None
        self.txt = txt

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

b = A("b")
k = B("k")
l = C("l")
d = D("d")
g = E("g")
e = F("e")
a = G("a")
n = H("n")
h = I("h")
f = J("f")

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.x: D = None
        self.o: B = None
        self.w: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: A = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.p: B = None
        self.u: H = None
        self.t: B = None
        self.q: D = None
        self.txt = txt

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

b = A("b")
k = B("k")
l = C("l")
d = D("d")
g = E("g")
e = F("e")
a = G("a")
n = H("n")
h = I("h")
f = J("f")

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