class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: C = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.t: F = None
        self.z: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.o: C = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.t: F = None
        self.z: D = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.o: C = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: D = None
        self.s: D = None
        self.txt = txt

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

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

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