class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: G = None
        self.t: G = None
        self.q: C = None
        self.v: G = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: B = None
        self.y: H = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: E = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: B = None
        self.y: H = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: E = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.txt = txt

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

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

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