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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: F = None
        self.z: H = None
        self.x: E = None
        self.s: F = None
        self.p: A = None
        self.q: D = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: C = None
        self.q: G = None
        self.p: A = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.s: B = None
        self.y: C = None
        self.u: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.txt = txt

g = A("g")
a = B("a")
m = C("m")
f = D("f")
e = E("e")
c = F("c")
h = G("h")
l = H("l")

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: F = None
        self.z: H = None
        self.x: E = None
        self.s: F = None
        self.p: A = None
        self.q: D = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: C = None
        self.q: G = None
        self.p: A = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.s: B = None
        self.y: C = None
        self.u: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: B = None
        self.txt = txt

g = A("g")
a = B("a")
m = C("m")
f = D("f")
e = E("e")
c = F("c")
h = G("h")
l = H("l")

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