class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: B = None
        self.q: B = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: B = None
        self.q: C = None
        self.p: D = None
        self.s: D = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.txt = txt

e = A("e")
g = B("g")
j = C("j")
b = D("b")
k = E("k")
h = F("h")
d = G("d")
a = H("a")
c = D("c")

e.w = c
g.w = e
g.x = c
g.t = k
j.y = h
j.v = h
j.p = a
j.w = e
b.y = g
b.r = j
k.u = a
k.s = g
k.q = g
k.z = e
k.r = d
h.s = j
h.o = a
d.u = e
d.v = g
d.q = j
d.t = j
d.p = c
d.s = b
a.t = k
a.r = j
c.y = g
c.r = j
assert h.o.r.v.s.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: B = None
        self.q: B = None
        self.z: A = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: B = None
        self.q: C = None
        self.p: D = None
        self.s: D = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: C = None
        self.txt = txt

e = A("e")
g = B("g")
j = C("j")
b = D("b")
k = E("k")
h = F("h")
d = G("d")
a = H("a")
c = D("c")

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