class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: I = None
        self.p: E = None
        self.s: I = None
        self.w: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: A = None
        self.q: F = None
        self.r: I = None
        self.z: D = None
        self.t: H = None
        self.s: I = None
        self.p: H = None
        self.u: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: D = None
        self.txt = txt

f = A("f")
d = B("d")
i = C("i")
m = D("m")
g = E("g")
b = F("b")
l = G("l")
a = H("a")
n = I("n")

f.y = b
f.o = n
f.s = n
f.p = g
f.w = d
d.v = f
d.w = a
i.s = b
i.t = d
i.u = l
i.v = g
i.y = a
i.x = m
i.o = m
m.w = b
g.y = a
g.t = a
g.p = a
g.o = f
g.q = b
g.r = n
g.s = n
g.u = n
g.z = m
b.y = l
b.s = m
l.y = f
a.z = i
a.v = m
n.q = g
n.t = m
assert g.q.s.w.s.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: I = None
        self.p: E = None
        self.s: I = None
        self.w: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: A = None
        self.q: F = None
        self.r: I = None
        self.z: D = None
        self.t: H = None
        self.s: I = None
        self.p: H = None
        self.u: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: D = None
        self.txt = txt

f = A("f")
d = B("d")
i = C("i")
m = D("m")
g = E("g")
b = F("b")
l = G("l")
a = H("a")
n = I("n")

f.y = b
f.o = n
f.s = n
f.p = g
f.w = d
d.v = f
d.w = a
i.s = b
i.t = d
i.u = l
i.v = g
i.y = a
i.x = m
i.o = m
m.w = b
g.y = a
g.t = a
g.p = a
g.o = f
g.q = b
g.r = n
g.s = n
g.u = n
g.z = m
b.y = l
b.s = m
l.y = f
a.z = i
a.v = m
n.q = g
n.t = m
assert g.q.s.w.s.w.y.txt == "l"