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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: I = None
        self.o: G = None
        self.q: F = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: C = None
        self.s: B = None
        self.y: H = None
        self.v: I = None
        self.x: A = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: H = None
        self.t: D = None
        self.u: I = None
        self.v: I = None
        self.z: B = None
        self.y: A = None
        self.w: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: I = None
        self.o: G = None
        self.q: F = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: C = None
        self.s: B = None
        self.y: H = None
        self.v: I = None
        self.x: A = None
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: H = None
        self.t: D = None
        self.u: I = None
        self.v: I = None
        self.z: B = None
        self.y: A = None
        self.w: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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