class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: G = None
        self.q: H = None
        self.t: E = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: A = None
        self.r: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: I = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: C = None
        self.w: B = None
        self.y: H = None
        self.t: E = None
        self.p: C = None
        self.s: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: H = None
        self.txt = txt

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

k.y = n
k.s = m
k.q = i
k.t = l
k.p = g
a.t = k
h.r = n
n.v = c
n.t = k
n.r = b
l.u = n
l.p = c
l.r = c
g.r = c
g.q = h
g.p = h
g.w = a
g.y = i
g.t = l
g.s = n
m.u = g
m.p = h
i.o = l
i.w = m
c.s = g
c.w = i
b.v = c
b.t = k
b.r = n
assert l.r.s.q.r.r.v.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: G = None
        self.q: H = None
        self.t: E = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: A = None
        self.r: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: I = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.q: C = None
        self.w: B = None
        self.y: H = None
        self.t: E = None
        self.p: C = None
        self.s: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: H = None
        self.txt = txt

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

k.y = n
k.s = m
k.q = i
k.t = l
k.p = g
a.t = k
h.r = n
n.v = c
n.t = k
n.r = b
l.u = n
l.p = c
l.r = c
g.r = c
g.q = h
g.p = h
g.w = a
g.y = i
g.t = l
g.s = n
m.u = g
m.p = h
i.o = l
i.w = m
c.s = g
c.w = i
b.v = c
b.t = k
b.r = n
assert l.r.s.q.r.r.v.s.s.txt == "n"