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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: A = None
        self.o: B = None
        self.r: B = None
        self.t: A = None
        self.z: B = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.z: F = None
        self.p: A = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: A = None
        self.o: B = None
        self.r: B = None
        self.t: A = None
        self.z: B = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.z: F = None
        self.p: A = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: D = None
        self.x: A = None
        self.txt = txt

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

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