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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: C = None
        self.x: C = None
        self.p: E = None
        self.v: I = None
        self.r: F = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: B = None
        self.r: C = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: I = None
        self.q: B = None
        self.o: B = None
        self.x: D = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: D = None
        self.y: B = None
        self.s: G = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: G = None
        self.x: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: C = None
        self.x: C = None
        self.p: E = None
        self.v: I = None
        self.r: F = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: B = None
        self.r: C = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: I = None
        self.q: B = None
        self.o: B = None
        self.x: D = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: D = None
        self.y: B = None
        self.s: G = None
        self.p: A = None
        self.txt = txt

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

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