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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: B = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: G = None
        self.p: G = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: B = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: G = None
        self.p: G = None
        self.u: A = None
        self.txt = txt

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

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

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

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