class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.w: B = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: E = None
        self.z: A = None
        self.o: A = None
        self.x: D = None
        self.q: D = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.w: B = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: E = None
        self.z: A = None
        self.o: A = None
        self.x: D = None
        self.q: D = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.v: E = None
        self.txt = txt

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

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