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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: A = None
        self.w: J = None
        self.s: J = None
        self.t: J = None
        self.p: H = None
        self.u: F = None
        self.z: H = None
        self.v: H = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: J = None
        self.q: C = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: B = None
        self.r: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.q: A = None
        self.w: J = None
        self.s: J = None
        self.t: J = None
        self.p: H = None
        self.u: F = None
        self.z: H = None
        self.v: H = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: J = None
        self.q: C = None
        self.o: B = None
        self.y: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: B = None
        self.r: E = None
        self.txt = txt

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

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

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