class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: A = None
        self.u: B = None
        self.y: E = None
        self.z: A = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: A = None
        self.txt = txt

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

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

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