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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.z: G = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.w: B = None
        self.y: H = None
        self.x: G = None
        self.u: G = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.r: D = None
        self.o: C = None
        self.t: I = None
        self.x: I = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.z: G = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: G = None
        self.w: B = None
        self.y: H = None
        self.x: G = None
        self.u: G = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.r: D = None
        self.o: C = None
        self.t: I = None
        self.x: I = None
        self.q: B = None
        self.txt = txt

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

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

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

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