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

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: F = None
        self.y: E = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: A = None
        self.x: E = None
        self.u: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.x: C = None
        self.p: F = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: F = None
        self.y: E = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: A = None
        self.x: E = None
        self.u: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.x: C = None
        self.p: F = None
        self.s: E = None
        self.txt = txt

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

e.x = g
e.y = g
e.q = f
e.v = a
a.s = i
a.r = g
a.q = e
b.p = a
b.q = g
b.z = e
m.w = i
m.z = d
m.y = g
m.t = e
m.v = a
g.q = f
d.q = i
d.s = e
d.r = e
d.x = g
d.u = g
i.w = m
i.v = b
i.x = k
i.p = l
i.s = g
l.q = i
l.s = e
l.r = e
l.x = g
l.u = g
f.q = i
f.s = e
f.r = e
f.x = g
f.u = g
k.p = a
k.q = g
k.z = e
assert l.u.q.q.w.z.u.txt == "g"