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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

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

i.z = e
i.v = a
i.x = a
i.s = f
e.u = b
e.q = i
e.t = c
e.x = l
e.w = a
f.v = l
f.r = l
f.u = c
f.o = b
a.p = f
c.r = e
c.z = f
c.x = l
c.p = b
c.o = i
b.r = i
b.p = i
b.s = c
b.v = f
b.u = f
b.z = a
b.x = l
l.x = c
l.t = a
l.u = a
l.z = a
l.r = e
assert e.t.o.s.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: D = None
        self.x: D = None
        self.s: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

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

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