class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: F = None
        self.o: F = None
        self.y: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: C = None
        self.v: B = None
        self.u: C = None
        self.p: C = None
        self.txt = txt

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

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

g.s = b
g.z = f
g.o = f
g.y = i
b.t = g
m.w = n
i.w = b
i.q = n
a.p = n
f.q = a
f.s = l
f.w = n
f.t = n
n.t = a
n.q = m
n.u = m
n.p = m
n.v = b
l.v = g
l.z = g
l.q = a
l.u = m
k.v = g
k.z = g
k.q = a
k.u = m
assert l.v.z.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: F = None
        self.o: F = None
        self.y: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: C = None
        self.v: B = None
        self.u: C = None
        self.p: C = None
        self.txt = txt

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

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

g.s = b
g.z = f
g.o = f
g.y = i
b.t = g
m.w = n
i.w = b
i.q = n
a.p = n
f.q = a
f.s = l
f.w = n
f.t = n
n.t = a
n.q = m
n.u = m
n.p = m
n.v = b
l.v = g
l.z = g
l.q = a
l.u = m
k.v = g
k.z = g
k.q = a
k.u = m
assert l.v.z.t.t.txt == "a"