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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: J = None
        self.y: I = None
        self.q: J = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.t: B = None
        self.o: J = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

g = A("g")
b = B("b")
j = C("j")
m = D("m")
e = E("e")
h = F("h")
n = G("n")
i = H("i")
d = I("d")
c = J("c")

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: J = None
        self.y: I = None
        self.q: J = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.t: B = None
        self.o: J = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

g = A("g")
b = B("b")
j = C("j")
m = D("m")
e = E("e")
h = F("h")
n = G("n")
i = H("i")
d = I("d")
c = J("c")

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