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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: D = None
        self.t: A = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: D = None
        self.t: A = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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