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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: H = None
        self.x: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: A = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: I = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.y: G = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: H = None
        self.x: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: A = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: I = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.y: G = None
        self.w: G = None
        self.txt = txt

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

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