class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.x: E = None
        self.s: B = None
        self.t: E = None
        self.r: G = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: G = None
        self.q: B = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

g = A("g")
l = B("l")
c = C("c")
h = D("h")
a = E("a")
n = F("n")
e = G("e")
f = D("f")

g.z = a
g.y = a
g.x = a
g.t = a
g.s = l
g.q = l
g.r = e
l.z = a
c.t = g
c.z = a
c.v = l
h.q = f
a.t = l
a.u = l
a.p = c
a.z = e
a.w = h
n.x = l
n.q = l
n.o = e
n.w = c
e.t = g
e.y = c
e.z = c
f.q = h
assert l.z.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.x: E = None
        self.s: B = None
        self.t: E = None
        self.r: G = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: G = None
        self.q: B = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

g = A("g")
l = B("l")
c = C("c")
h = D("h")
a = E("a")
n = F("n")
e = G("e")
f = D("f")

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