class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.p: C = None
        self.o: D = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: H = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: H = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.v: E = None
        self.o: C = None
        self.t: A = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.q: E = None
        self.o: I = None
        self.u: I = None
        self.w: E = None
        self.txt = txt

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

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

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

g.x = k
g.v = c
g.p = a
g.o = i
g.w = j
d.r = e
d.w = e
d.z = h
a.v = d
a.w = h
a.p = g
i.q = c
i.z = e
j.r = f
j.q = h
c.p = e
c.r = j
c.v = j
c.z = j
c.o = a
c.t = k
e.v = d
e.x = d
e.q = j
e.w = j
e.o = f
e.u = f
h.o = e
h.x = i
h.p = c
f.z = c
k.x = g
k.v = c
k.p = a
k.o = i
k.w = j
assert d.z.o.x.z.x.q.o.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.p: C = None
        self.o: D = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: H = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: H = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.v: E = None
        self.o: C = None
        self.t: A = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.q: E = None
        self.o: I = None
        self.u: I = None
        self.w: E = None
        self.txt = txt

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

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

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

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