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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.s: B = None
        self.v: D = None
        self.z: I = None
        self.y: D = None
        self.w: G = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: F = None
        self.u: H = None
        self.q: H = None
        self.y: B = None
        self.w: H = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: D = None
        self.w: C = 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.y: H = None
        self.t: D = None
        self.x: D = None
        self.z: B = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: H = None
        self.o: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.s: B = None
        self.v: D = None
        self.z: I = None
        self.y: D = None
        self.w: G = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: F = None
        self.u: H = None
        self.q: H = None
        self.y: B = None
        self.w: H = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: D = None
        self.w: C = 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.y: H = None
        self.t: D = None
        self.x: D = None
        self.z: B = None
        self.r: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: H = None
        self.o: C = None
        self.txt = txt

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

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