class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: F = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: H = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: H = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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