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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: E = None
        self.w: C = None
        self.r: I = None
        self.v: E = None
        self.q: D = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: C = None
        self.v: E = None
        self.y: H = None
        self.u: A = None
        self.z: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: F = None
        self.z: I = None
        self.p: I = None
        self.o: H = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: B = None
        self.w: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: E = None
        self.w: C = None
        self.r: I = None
        self.v: E = None
        self.q: D = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: C = None
        self.v: E = None
        self.y: H = None
        self.u: A = None
        self.z: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: F = None
        self.z: I = None
        self.p: I = None
        self.o: H = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: B = None
        self.w: I = None
        self.txt = txt

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

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

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