class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: E = None
        self.p: E = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: I = None
        self.q: A = None
        self.t: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: E = None
        self.o: A = None
        self.q: B = None
        self.y: H = None
        self.p: F = None
        self.s: F = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: I = None
        self.q: A = None
        self.t: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: E = None
        self.o: A = None
        self.q: B = None
        self.y: H = None
        self.p: F = None
        self.s: F = None
        self.z: E = None
        self.txt = txt

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

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