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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: C = None
        self.v: G = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: H = None
        self.w: G = None
        self.t: E = None
        self.p: B = None
        self.q: E = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.r: G = None
        self.p: G = None
        self.x: H = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: E = None
        self.y: D = None
        self.t: D = None
        self.s: B = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: C = None
        self.v: G = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: H = None
        self.w: G = None
        self.t: E = None
        self.p: B = None
        self.q: E = None
        self.v: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.r: G = None
        self.p: G = None
        self.x: H = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: E = None
        self.y: D = None
        self.t: D = None
        self.s: B = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: A = None
        self.txt = txt

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

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