class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: F = None
        self.t: E = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: E = None
        self.y: D = None
        self.z: H = None
        self.t: G = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: G = None
        self.w: A = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: B = None
        self.s: C = None
        self.y: G = None
        self.q: H = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: E = None
        self.y: D = None
        self.z: H = None
        self.t: G = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: G = None
        self.w: A = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: B = None
        self.s: C = None
        self.y: G = None
        self.q: H = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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