class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: F = None
        self.r: G = None
        self.q: B = None
        self.v: G = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: C = None
        self.y: E = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: E = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: C = None
        self.y: E = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: E = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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