class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: E = None
        self.o: B = None
        self.u: C = None
        self.q: C = None
        self.v: F = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: D = None
        self.q: E = None
        self.z: D = None
        self.v: C = None
        self.o: D = None
        self.y: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: D = None
        self.q: E = None
        self.z: D = None
        self.v: C = None
        self.o: D = None
        self.y: A = None
        self.txt = txt

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

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