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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.w: D = None
        self.y: E = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.w: D = None
        self.y: E = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: G = None
        self.txt = txt

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

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

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