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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: F = None
        self.z: J = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: E = None
        self.x: F = None
        self.r: G = None
        self.w: G = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: B = None
        self.z: C = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: F = None
        self.r: H = None
        self.w: H = None
        self.o: F = None
        self.v: J = None
        self.x: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: H = None
        self.p: J = None
        self.z: B = None
        self.x: C = None
        self.y: J = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: D = None
        self.w: G = None
        self.s: F = None
        self.u: E = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: F = None
        self.z: J = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: E = None
        self.x: F = None
        self.r: G = None
        self.w: G = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: B = None
        self.z: C = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: F = None
        self.r: H = None
        self.w: H = None
        self.o: F = None
        self.v: J = None
        self.x: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: H = None
        self.p: J = None
        self.z: B = None
        self.x: C = None
        self.y: J = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: D = None
        self.w: G = None
        self.s: F = None
        self.u: E = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

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

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