class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: F = None
        self.x: C = None
        self.s: B = None
        self.t: E = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.y: E = None
        self.o: G = None
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: G = None
        self.t: F = None
        self.u: D = None
        self.o: G = None
        self.q: C = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.y: E = None
        self.o: G = None
        self.x: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: G = None
        self.t: F = None
        self.u: D = None
        self.o: G = None
        self.q: C = None
        self.p: D = None
        self.txt = txt

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

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

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

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