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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: I = None
        self.s: A = None
        self.z: D = None
        self.y: C = None
        self.q: G = None
        self.x: A = None
        self.v: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: B = None
        self.v: I = None
        self.u: E = None
        self.w: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: G = None
        self.o: C = None
        self.y: C = None
        self.x: I = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.u: G = None
        self.v: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: I = None
        self.s: A = None
        self.z: D = None
        self.y: C = None
        self.q: G = None
        self.x: A = None
        self.v: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: B = None
        self.v: I = None
        self.u: E = None
        self.w: A = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: G = None
        self.o: C = None
        self.y: C = None
        self.x: I = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: C = None
        self.u: G = None
        self.v: H = None
        self.txt = txt

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

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