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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: F = None
        self.v: E = None
        self.t: C = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: D = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: D = None
        self.w: B = None
        self.y: G = None
        self.q: B = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: B = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: B = None
        self.p: A = None
        self.q: A = None
        self.w: E = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: F = None
        self.v: E = None
        self.t: C = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: D = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: D = None
        self.w: B = None
        self.y: G = None
        self.q: B = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: B = None
        self.o: B = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: B = None
        self.p: A = None
        self.q: A = None
        self.w: E = None
        self.r: A = None
        self.txt = txt

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

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