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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.q: C = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: A = None
        self.p: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: A = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.q: C = None
        self.u: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: A = None
        self.p: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: A = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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