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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: C = None
        self.x: C = None
        self.q: E = None
        self.u: F = None
        self.o: C = None
        self.p: E = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: I = None
        self.y: C = None
        self.z: B = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: F = None
        self.p: I = None
        self.y: C = None
        self.t: A = None
        self.v: D = None
        self.o: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: C = None
        self.x: C = None
        self.q: E = None
        self.u: F = None
        self.o: C = None
        self.p: E = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: I = None
        self.y: C = None
        self.z: B = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: F = None
        self.p: I = None
        self.y: C = None
        self.t: A = None
        self.v: D = None
        self.o: G = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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