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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: H = None
        self.t: I = None
        self.q: F = None
        self.v: D = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: G = None
        self.z: B = None
        self.v: J = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.t: I = None
        self.o: D = None
        self.u: J = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: H = None
        self.t: I = None
        self.q: F = None
        self.v: D = None
        self.w: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: G = None
        self.z: B = None
        self.v: J = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.t: I = None
        self.o: D = None
        self.u: J = None
        self.txt = txt

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

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

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

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

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

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

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