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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: C = None
        self.z: I = None
        self.u: C = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: D = None
        self.z: F = None
        self.r: D = None
        self.u: C = None
        self.w: E = None
        self.y: D = None
        self.x: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: D = None
        self.v: F = None
        self.s: B = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: D = None
        self.v: I = None
        self.o: A = None
        self.p: C = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.u: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: C = None
        self.z: I = None
        self.u: C = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: D = None
        self.z: F = None
        self.r: D = None
        self.u: C = None
        self.w: E = None
        self.y: D = None
        self.x: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: D = None
        self.v: F = None
        self.s: B = None
        self.x: A = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: D = None
        self.v: I = None
        self.o: A = None
        self.p: C = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.u: B = None
        self.txt = txt

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

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

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