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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: H = None
        self.w: E = None
        self.y: G = None
        self.o: A = None
        self.t: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: E = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

a = A("a")
m = B("m")
c = C("c")
k = D("k")
d = E("d")
g = F("g")
b = G("b")
i = H("i")
e = I("e")
n = E("n")

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: H = None
        self.w: E = None
        self.y: G = None
        self.o: A = None
        self.t: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: E = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

a = A("a")
m = B("m")
c = C("c")
k = D("k")
d = E("d")
g = F("g")
b = G("b")
i = H("i")
e = I("e")
n = E("n")

a.o = i
m.v = g
m.x = i
m.t = i
m.w = n
m.y = b
m.o = a
c.y = d
c.u = k
k.p = b
k.y = b
k.o = d
d.y = a
d.r = e
d.o = c
g.z = k
g.x = m
g.q = m
g.u = m
g.y = e
g.w = a
g.t = d
b.o = a
i.x = e
i.q = d
i.t = m
i.v = g
e.p = c
n.y = a
n.r = e
n.o = c
assert e.p.u.y.o.o.v.u.w.o.txt == "c"