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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: G = None
        self.p: B = None
        self.v: D = None
        self.w: G = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: C = None
        self.w: D = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: F = None
        self.t: B = None
        self.o: F = None
        self.p: C = None
        self.z: B = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: G = None
        self.p: B = None
        self.v: D = None
        self.w: G = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: A = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: C = None
        self.w: D = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: F = None
        self.t: B = None
        self.o: F = None
        self.p: C = None
        self.z: B = None
        self.s: E = None
        self.txt = txt

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

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

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