class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: D = None
        self.w: G = None
        self.s: F = None
        self.x: D = None
        self.z: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: A = None
        self.s: D = None
        self.o: F = None
        self.p: D = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: A = None
        self.s: D = None
        self.o: F = None
        self.p: D = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

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