class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.p: C = None
        self.s: I = None
        self.y: J = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: I = None
        self.x: E = None
        self.w: G = None
        self.p: I = None
        self.y: E = None
        self.t: H = None
        self.u: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: B = None
        self.y: A = None
        self.z: I = None
        self.u: E = None
        self.v: E = None
        self.x: F = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: I = None
        self.x: E = None
        self.w: G = None
        self.p: I = None
        self.y: E = None
        self.t: H = None
        self.u: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: B = None
        self.y: A = None
        self.z: I = None
        self.u: E = None
        self.v: E = None
        self.x: F = None
        self.t: G = None
        self.txt = txt

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

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