class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: E = None
        self.r: B = None
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: H = None
        self.y: E = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: G = None
        self.s: B = None
        self.z: I = None
        self.o: E = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: H = None
        self.y: E = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: G = None
        self.s: B = None
        self.z: I = None
        self.o: E = None
        self.p: G = None
        self.txt = txt

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

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

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