class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: F = None
        self.s: E = None
        self.u: A = None
        self.p: I = None
        self.y: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: G = None
        self.z: I = None
        self.s: F = None
        self.q: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: F = None
        self.s: E = None
        self.u: A = None
        self.p: I = None
        self.y: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: G = None
        self.z: I = None
        self.s: F = None
        self.q: C = None
        self.txt = txt

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

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

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