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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.u: H = None
        self.x: H = None
        self.r: A = None
        self.q: A = None
        self.v: G = None
        self.t: F = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: G = None
        self.u: H = None
        self.x: H = None
        self.r: A = None
        self.q: A = None
        self.v: G = None
        self.t: F = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

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

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

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