class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: H = None
        self.v: D = None
        self.s: E = None
        self.w: E = None
        self.t: B = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: C = None
        self.p: I = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: C = None
        self.y: A = None
        self.q: I = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: A = None
        self.v: A = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: C = None
        self.p: I = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: C = None
        self.y: A = None
        self.q: I = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: A = None
        self.v: A = None
        self.q: G = None
        self.txt = txt

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

c.y = i
c.t = i
c.o = f
c.v = n
c.s = j
c.w = j
c.r = b
i.s = b
i.p = b
i.u = g
i.r = c
g.s = d
g.q = c
m.w = j
m.s = j
j.s = a
j.q = a
j.y = f
j.o = f
d.y = j
d.r = m
d.s = m
d.u = g
a.s = i
a.o = g
a.v = g
a.y = c
a.q = b
f.y = a
b.r = i
b.s = c
b.v = c
b.q = a
n.w = j
n.s = j
assert b.r.r.r.q.y.o.y.y.y.txt == "i"