class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: F = None
        self.y: I = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: D = None
        self.s: I = None
        self.v: B = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.w: B = None
        self.r: B = None
        self.s: D = None
        self.t: B = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: D = None
        self.u: I = None
        self.v: A = None
        self.o: G = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: A = None
        self.w: F = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.o: I = None
        self.p: A = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

c = A("c")
a = B("a")
j = C("j")
e = D("e")
f = E("f")
h = F("h")
n = G("n")
b = H("b")
m = I("m")
l = J("l")

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: D = None
        self.s: I = None
        self.v: B = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: F = None
        self.w: B = None
        self.r: B = None
        self.s: D = None
        self.t: B = None
        self.z: D = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: D = None
        self.u: I = None
        self.v: A = None
        self.o: G = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: A = None
        self.w: F = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: D = None
        self.o: I = None
        self.p: A = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

c = A("c")
a = B("a")
j = C("j")
e = D("e")
f = E("f")
h = F("h")
n = G("n")
b = H("b")
m = I("m")
l = J("l")

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