class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: H = None
        self.u: B = None
        self.q: G = None
        self.s: C = None
        self.t: H = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: A = None
        self.u: F = None
        self.y: A = None
        self.w: B = None
        self.z: C = None
        self.r: E = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: A = None
        self.u: F = None
        self.y: A = None
        self.w: B = None
        self.z: C = None
        self.r: E = None
        self.q: A = None
        self.txt = txt

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

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

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