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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: F = None
        self.r: E = None
        self.p: A = None
        self.x: D = None
        self.o: A = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: B = None
        self.s: D = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: D = None
        self.o: E = None
        self.r: D = None
        self.z: C = None
        self.txt = txt

g = A("g")
m = B("m")
h = C("h")
n = D("n")
l = E("l")
j = F("j")
b = G("b")
i = E("i")
k = D("k")

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: F = None
        self.r: E = None
        self.p: A = None
        self.x: D = None
        self.o: A = None
        self.q: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: B = None
        self.s: D = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: D = None
        self.o: E = None
        self.r: D = None
        self.z: C = None
        self.txt = txt

g = A("g")
m = B("m")
h = C("h")
n = D("n")
l = E("l")
j = F("j")
b = G("b")
i = E("i")
k = D("k")

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