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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: D = None
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: G = None
        self.p: A = None
        self.s: H = None
        self.t: H = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

f = A("f")
g = B("g")
k = C("k")
e = D("e")
b = E("b")
c = F("c")
l = G("l")
m = H("m")
i = B("i")
a = F("a")

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: D = None
        self.z: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: G = None
        self.p: A = None
        self.s: H = None
        self.t: H = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

f = A("f")
g = B("g")
k = C("k")
e = D("e")
b = E("b")
c = F("c")
l = G("l")
m = H("m")
i = B("i")
a = F("a")

f.x = g
f.v = m
g.y = m
g.p = i
g.s = b
g.r = f
g.v = f
g.z = f
g.o = e
k.w = f
k.t = e
k.z = b
e.q = k
b.q = e
c.z = m
c.s = m
c.t = m
c.w = l
c.p = f
c.v = k
l.w = f
l.r = f
m.s = a
i.y = m
i.p = g
i.s = b
i.r = f
i.v = f
i.z = f
i.o = e
a.z = m
a.s = m
a.t = m
a.w = l
a.p = f
a.v = k
assert a.z.s.t.s.s.s.w.w.x.z.txt == "f"