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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: I = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: D = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: B = None
        self.z: E = None
        self.txt = txt

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

b.x = l
b.r = e
b.y = d
k.r = e
k.w = a
k.t = n
k.x = c
l.o = n
l.r = k
l.t = e
e.q = d
e.w = n
e.x = n
e.y = b
e.t = a
e.s = a
d.r = n
d.u = l
n.q = c
n.o = d
c.o = a
c.t = a
c.q = l
c.p = l
c.x = m
m.y = b
m.w = e
m.u = n
a.o = c
a.r = k
a.z = d
assert n.o.u.t.t.o.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: D = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: I = None
        self.t: F = None
        self.x: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: D = None
        self.u: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: B = None
        self.z: E = None
        self.txt = txt

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

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