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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.y: C = None
        self.z: G = None
        self.v: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: A = None
        self.w: A = None
        self.t: G = None
        self.z: I = None
        self.y: A = None
        self.x: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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

d.t = l
d.v = e
g.r = n
g.o = d
g.y = e
g.z = k
g.v = b
e.t = d
e.q = j
n.o = l
j.s = m
m.r = n
m.o = n
m.s = d
m.w = d
m.y = d
m.t = k
m.z = l
m.x = j
k.x = n
k.q = b
k.v = b
k.w = b
b.y = m
b.z = d
l.r = b
l.w = b
l.v = n
l.s = j
l.z = j
l.q = j
l.u = g
l.t = g
l.p = e
assert b.z.v.q.s.o.o.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.y: C = None
        self.z: G = None
        self.v: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: A = None
        self.w: A = None
        self.t: G = None
        self.z: I = None
        self.y: A = None
        self.x: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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