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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: H = None
        self.w: E = None
        self.o: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: H = None
        self.w: E = None
        self.o: F = None
        self.txt = txt

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

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

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