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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: F = None
        self.v: E = None
        self.o: I = None
        self.y: D = None
        self.z: H = None
        self.q: H = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.u: B = None
        self.y: B = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: F = None
        self.v: E = None
        self.o: I = None
        self.y: D = None
        self.z: H = None
        self.q: H = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.u: B = None
        self.y: B = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

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

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