class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: E = None
        self.v: G = None
        self.y: D = None
        self.w: F = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: B = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: C = None
        self.w: A = None
        self.q: E = None
        self.txt = txt

f = A("f")
e = B("e")
i = C("i")
k = D("k")
l = E("l")
m = F("m")
n = G("n")
g = G("g")
c = G("c")
d = B("d")

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: B = None
        self.z: A = None
        self.w: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: C = None
        self.w: A = None
        self.q: E = None
        self.txt = txt

f = A("f")
e = B("e")
i = C("i")
k = D("k")
l = E("l")
m = F("m")
n = G("n")
g = G("g")
c = G("c")
d = B("d")

f.x = c
f.r = l
f.v = g
f.y = k
f.w = m
f.q = m
e.u = m
e.r = m
e.p = k
e.w = k
e.q = d
e.z = d
e.v = f
i.t = m
i.x = d
i.w = d
i.z = f
k.r = c
k.u = m
k.v = m
k.w = n
k.z = f
l.t = i
l.w = i
l.y = e
l.v = e
l.r = m
l.x = k
m.q = e
n.o = l
n.q = l
n.v = i
n.w = f
g.o = l
g.q = l
g.v = i
g.w = f
c.o = l
c.q = l
c.v = i
c.w = f
d.u = m
d.r = m
d.p = k
d.w = k
d.q = e
d.z = e
d.v = f
assert l.x.z.w.q.v.txt == "f"