class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: C = None
        self.s: D = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: I = None
        self.v: H = None
        self.u: B = None
        self.t: A = None
        self.z: I = None
        self.r: A = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: I = None
        self.v: H = None
        self.u: B = None
        self.t: A = None
        self.z: I = None
        self.r: A = None
        self.q: H = None
        self.txt = txt

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

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

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

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