class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: A = None
        self.x: F = None
        self.w: I = None
        self.z: E = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: H = None
        self.p: H = None
        self.w: E = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: A = None
        self.v: I = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: G = None
        self.w: B = None
        self.v: G = None
        self.z: B = None
        self.s: D = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: C = None
        self.y: E = None
        self.o: C = None
        self.t: B = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: I = None
        self.p: C = None
        self.z: E = None
        self.v: C = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: A = None
        self.x: F = None
        self.w: I = None
        self.z: E = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: H = None
        self.p: H = None
        self.w: E = None
        self.u: A = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: A = None
        self.v: I = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: G = None
        self.w: B = None
        self.v: G = None
        self.z: B = None
        self.s: D = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: C = None
        self.y: E = None
        self.o: C = None
        self.t: B = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: I = None
        self.p: C = None
        self.z: E = None
        self.v: C = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.p: A = None
        self.txt = txt

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

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