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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: G = None
        self.y: A = None
        self.w: B = None
        self.o: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.s: B = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: G = None
        self.y: A = None
        self.w: B = None
        self.o: G = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: D = None
        self.s: B = None
        self.p: D = None
        self.txt = txt

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

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