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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

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