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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: I = None
        self.q: G = None
        self.z: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.y: G = None
        self.t: I = None
        self.u: I = None
        self.q: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: A = None
        self.t: F = None
        self.x: G = None
        self.o: D = None
        self.r: E = None
        self.u: F = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.q: F = None
        self.w: G = None
        self.s: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: I = None
        self.q: G = None
        self.z: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.y: G = None
        self.t: I = None
        self.u: I = None
        self.q: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: A = None
        self.t: F = None
        self.x: G = None
        self.o: D = None
        self.r: E = None
        self.u: F = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.q: F = None
        self.w: G = None
        self.s: C = None
        self.txt = txt

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

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