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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: G = None
        self.v: B = None
        self.z: G = None
        self.x: G = None
        self.w: D = None
        self.q: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: G = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: G = None
        self.v: B = None
        self.z: G = None
        self.x: G = None
        self.w: D = None
        self.q: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: G = None
        self.u: C = None
        self.txt = txt

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

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