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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: H = None
        self.o: C = None
        self.p: D = None
        self.r: H = None
        self.y: B = None
        self.v: B = None
        self.q: E = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: H = None
        self.o: C = None
        self.p: D = None
        self.r: H = None
        self.y: B = None
        self.v: B = None
        self.q: E = None
        self.w: B = None
        self.txt = txt

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

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

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

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