class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: F = None
        self.p: D = None
        self.w: E = None
        self.q: D = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: D = None
        self.o: G = None
        self.z: D = None
        self.x: A = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: D = None
        self.o: G = None
        self.z: D = None
        self.x: A = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

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

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

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