class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: E = None
        self.x: I = None
        self.w: F = None
        self.y: G = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: H = None
        self.r: A = None
        self.p: I = None
        self.v: C = None
        self.x: C = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.v: A = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: I = None
        self.q: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: H = None
        self.r: A = None
        self.p: I = None
        self.v: C = None
        self.x: C = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.v: A = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: I = None
        self.q: D = None
        self.txt = txt

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

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

i.s = l
i.t = f
i.x = k
i.w = m
i.z = m
i.p = m
i.y = e
h.z = e
h.w = b
h.r = i
h.p = k
h.v = c
h.x = c
h.t = f
c.t = e
c.o = b
l.p = e
l.q = h
l.v = i
l.s = m
f.v = e
m.w = k
m.t = k
m.y = c
m.s = i
m.v = f
m.z = h
e.q = m
e.y = i
e.o = b
e.t = c
b.p = h
b.w = k
b.q = l
k.w = h
k.p = e
assert b.q.q.p.w.z.o.p.p.p.txt == "e"