class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: F = None
        self.x: F = None
        self.o: F = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: C = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.p: F = None
        self.w: A = None
        self.s: C = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: E = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: C = None
        self.o: B = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.p: F = None
        self.w: A = None
        self.s: C = None
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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