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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: H = None
        self.s: E = None
        self.p: H = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: E = None
        self.z: E = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: G = None
        self.s: E = None
        self.w: G = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: E = None
        self.v: D = None
        self.z: D = None
        self.o: A = None
        self.u: H = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: H = None
        self.s: E = None
        self.p: H = None
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: E = None
        self.z: E = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: G = None
        self.s: E = None
        self.w: G = None
        self.t: A = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: E = None
        self.v: D = None
        self.z: D = None
        self.o: A = None
        self.u: H = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: G = None
        self.txt = txt

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

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