class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: G = None
        self.r: H = None
        self.t: I = None
        self.q: F = None
        self.p: C = None
        self.x: G = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.r: D = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: H = None
        self.q: D = None
        self.y: D = None
        self.x: G = None
        self.o: F = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: B = None
        self.y: I = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: C = None
        self.w: C = None
        self.r: A = None
        self.p: E = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.r: D = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: H = None
        self.q: D = None
        self.y: D = None
        self.x: G = None
        self.o: F = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: B = None
        self.y: I = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: C = None
        self.w: C = None
        self.r: A = None
        self.p: E = None
        self.v: G = None
        self.txt = txt

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

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