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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.u: G = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.r: B = None
        self.p: F = None
        self.y: F = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.r: G = None
        self.y: B = None
        self.s: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.u: G = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: A = None
        self.r: B = None
        self.p: F = None
        self.y: F = None
        self.q: A = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.r: G = None
        self.y: B = None
        self.s: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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