class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: I = None
        self.x: C = None
        self.s: F = None
        self.p: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: E = None
        self.o: F = None
        self.y: B = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: G = None
        self.v: B = None
        self.y: F = None
        self.w: A = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: B = None
        self.y: C = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: E = None
        self.o: F = None
        self.y: B = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: G = None
        self.v: B = None
        self.y: F = None
        self.w: A = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: B = None
        self.y: C = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.txt = txt

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

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

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

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