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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.w: B = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: H = None
        self.r: I = None
        self.o: I = None
        self.p: C = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: F = None
        self.r: C = None
        self.v: B = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: E = None
        self.t: I = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.o: G = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.w: B = None
        self.s: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: H = None
        self.r: I = None
        self.o: I = None
        self.p: C = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: F = None
        self.r: C = None
        self.v: B = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: E = None
        self.t: I = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: H = None
        self.o: G = None
        self.u: F = None
        self.txt = txt

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

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