class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: C = None
        self.x: F = None
        self.t: A = None
        self.r: A = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: B = None
        self.x: C = None
        self.q: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: C = None
        self.x: F = None
        self.t: A = None
        self.r: A = None
        self.w: G = None
        self.z: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: B = None
        self.x: C = None
        self.q: E = None
        self.txt = txt

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

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

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