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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.v: D = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.v: D = None
        self.u: A = None
        self.txt = txt

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

i.t = h
i.o = e
i.s = e
i.q = c
i.u = f
i.r = f
e.q = j
e.y = i
c.p = g
c.r = e
n.q = g
n.u = j
n.s = j
n.y = h
h.z = m
h.o = e
h.u = f
h.q = j
g.v = a
g.t = c
m.v = i
j.r = g
f.z = n
f.v = n
f.p = e
f.u = i
a.v = i
assert a.v.s.q.r.t.txt == "c"