class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: F = None
        self.z: I = None
        self.u: D = None
        self.s: C = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: C = None
        self.o: H = None
        self.q: E = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: C = None
        self.t: G = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: C = None
        self.o: H = None
        self.q: E = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: C = None
        self.t: G = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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

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