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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: F = None
        self.v: E = None
        self.t: F = None
        self.o: E = None
        self.y: D = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: C = None
        self.u: C = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: E = None
        self.v: B = None
        self.w: D = None
        self.txt = txt

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

m = A("m")
a = B("a")
b = C("b")
f = D("f")
l = E("l")
j = F("j")
k = G("k")
n = H("n")

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: F = None
        self.v: E = None
        self.t: F = None
        self.o: E = None
        self.y: D = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: C = None
        self.u: C = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: E = None
        self.v: B = None
        self.w: D = None
        self.txt = txt

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

m = A("m")
a = B("a")
b = C("b")
f = D("f")
l = E("l")
j = F("j")
k = G("k")
n = H("n")

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