class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.u: E = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.x: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: F = None
        self.o: I = None
        self.p: B = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: H = None
        self.r: H = None
        self.y: E = None
        self.v: C = None
        self.u: H = None
        self.w: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.u: E = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: G = None
        self.x: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: F = None
        self.o: I = None
        self.p: B = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: H = None
        self.r: H = None
        self.y: E = None
        self.v: C = None
        self.u: H = None
        self.w: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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