class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: H = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.s: I = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: A = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: H = None
        self.t: F = None
        self.u: J = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: A = None
        self.y: E = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: F = None
        self.p: I = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: E = None
        self.w: D = None
        self.v: E = None
        self.z: E = None
        self.u: H = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.s: I = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: A = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: H = None
        self.t: F = None
        self.u: J = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: A = None
        self.y: E = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: F = None
        self.p: I = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: E = None
        self.w: D = None
        self.v: E = None
        self.z: E = None
        self.u: H = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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