class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: B = None
        self.s: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: F = None
        self.q: C = None
        self.w: D = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: D = None
        self.w: A = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: F = None
        self.q: C = None
        self.w: D = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: D = None
        self.w: A = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: B = None
        self.txt = txt

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

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

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