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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: E = None
        self.t: A = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: G = None
        self.o: F = None
        self.z: E = None
        self.v: E = None
        self.t: B = None
        self.w: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: F = None
        self.o: F = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: B = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: E = None
        self.t: A = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: G = None
        self.o: F = None
        self.z: E = None
        self.v: E = None
        self.t: B = None
        self.w: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: F = None
        self.o: F = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: B = None
        self.r: F = None
        self.txt = txt

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

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