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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: H = None
        self.o: D = None
        self.txt = txt

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

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

b = A("b")
f = B("f")
c = C("c")
l = D("l")
h = E("h")
e = F("e")
k = G("k")
j = H("j")
n = C("n")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: H = None
        self.o: D = None
        self.txt = txt

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

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

b = A("b")
f = B("f")
c = C("c")
l = D("l")
h = E("h")
e = F("e")
k = G("k")
j = H("j")
n = C("n")

b.y = l
f.o = b
f.s = b
f.w = h
f.u = h
f.t = e
f.p = e
f.z = j
c.v = h
c.p = j
c.t = b
c.z = f
c.q = f
c.s = n
l.o = k
l.s = k
l.u = h
l.x = f
l.v = b
l.q = n
h.o = k
h.r = k
h.q = k
h.t = k
h.v = e
h.w = b
h.u = b
e.x = b
e.r = j
e.o = l
k.y = h
k.t = b
k.r = b
k.o = l
k.x = l
k.s = e
k.p = f
j.q = f
j.w = c
j.p = c
j.y = b
n.v = h
n.p = j
n.t = b
n.z = f
n.q = f
n.s = c
assert c.s.v.w.txt == "b"