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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: I = None
        self.t: I = None
        self.v: A = None
        self.o: E = None
        self.z: F = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: E = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: C = None
        self.y: B = None
        self.o: H = None
        self.w: G = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: I = None
        self.t: I = None
        self.v: A = None
        self.o: E = None
        self.z: F = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: E = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: C = None
        self.y: B = None
        self.o: H = None
        self.w: G = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

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

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