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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: I = None
        self.v: E = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: F = None
        self.r: H = None
        self.x: B = None
        self.v: C = None
        self.q: E = None
        self.z: I = None
        self.o: H = None
        self.s: C = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: J = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: B = None
        self.y: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: G = None
        self.u: E = None
        self.t: E = None
        self.y: B = None
        self.w: E = None
        self.r: H = None
        self.txt = txt

d = A("d")
i = B("i")
j = C("j")
l = D("l")
f = E("f")
h = F("h")
k = G("k")
g = H("g")
a = I("a")
m = J("m")

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: I = None
        self.v: E = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: F = None
        self.r: H = None
        self.x: B = None
        self.v: C = None
        self.q: E = None
        self.z: I = None
        self.o: H = None
        self.s: C = None
        self.u: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: J = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.r: B = None
        self.y: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: G = None
        self.u: E = None
        self.t: E = None
        self.y: B = None
        self.w: E = None
        self.r: H = None
        self.txt = txt

d = A("d")
i = B("i")
j = C("j")
l = D("l")
f = E("f")
h = F("h")
k = G("k")
g = H("g")
a = I("a")
m = J("m")

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