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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: H = None
        self.z: B = None
        self.v: B = None
        self.y: B = None
        self.w: I = None
        self.u: G = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: C = None
        self.w: I = None
        self.s: F = None
        self.t: F = None
        self.p: C = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: G = None
        self.x: B = None
        self.p: H = None
        self.q: H = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: H = None
        self.z: B = None
        self.v: B = None
        self.y: B = None
        self.w: I = None
        self.u: G = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: C = None
        self.w: I = None
        self.s: F = None
        self.t: F = None
        self.p: C = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: G = None
        self.x: B = None
        self.p: H = None
        self.q: H = None
        self.z: H = None
        self.txt = txt

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

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