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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.o: D = None
        self.y: G = None
        self.u: B = None
        self.v: F = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: D = None
        self.t: F = None
        self.r: I = None
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.w: I = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.o: D = None
        self.y: G = None
        self.u: B = None
        self.v: F = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: D = None
        self.t: F = None
        self.r: I = None
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.w: I = None
        self.s: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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