class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: C = None
        self.t: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: H = None
        self.v: A = None
        self.s: F = None
        self.t: A = None
        self.x: A = None
        self.z: H = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: H = None
        self.v: A = None
        self.s: F = None
        self.t: A = None
        self.x: A = None
        self.z: H = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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