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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.p: H = None
        self.t: H = None
        self.x: A = None
        self.txt = txt

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

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

i = A("i")
a = B("a")
c = C("c")
f = D("f")
j = E("j")
h = F("h")
n = G("n")
b = H("b")
d = D("d")

i.w = h
i.u = h
i.p = c
i.z = a
a.z = h
a.u = d
a.s = j
a.w = j
a.y = j
a.t = c
a.x = i
c.w = j
c.v = j
c.z = j
c.p = h
c.q = n
c.y = b
c.u = f
f.z = i
f.o = i
f.y = d
f.w = b
f.s = h
f.p = j
f.u = a
j.u = b
j.z = b
j.r = a
j.q = c
j.s = c
j.w = d
h.q = n
h.u = c
h.p = b
h.t = b
h.x = i
n.w = i
n.t = f
b.x = j
b.y = i
d.z = i
d.o = i
d.y = f
d.w = b
d.s = h
d.p = j
d.u = a
assert f.s.u.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: C = None
        self.u: F = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.p: H = None
        self.t: H = None
        self.x: A = None
        self.txt = txt

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

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

i = A("i")
a = B("a")
c = C("c")
f = D("f")
j = E("j")
h = F("h")
n = G("n")
b = H("b")
d = D("d")

i.w = h
i.u = h
i.p = c
i.z = a
a.z = h
a.u = d
a.s = j
a.w = j
a.y = j
a.t = c
a.x = i
c.w = j
c.v = j
c.z = j
c.p = h
c.q = n
c.y = b
c.u = f
f.z = i
f.o = i
f.y = d
f.w = b
f.s = h
f.p = j
f.u = a
j.u = b
j.z = b
j.r = a
j.q = c
j.s = c
j.w = d
h.q = n
h.u = c
h.p = b
h.t = b
h.x = i
n.w = i
n.t = f
b.x = j
b.y = i
d.z = i
d.o = i
d.y = f
d.w = b
d.s = h
d.p = j
d.u = a
assert f.s.u.y.y.txt == "i"