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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.q: J = None
        self.o: C = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: E = None
        self.u: D = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: C = None
        self.v: E = None
        self.w: I = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: J = None
        self.v: C = None
        self.x: D = None
        self.u: E = None
        self.w: J = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.q: J = None
        self.o: C = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: E = None
        self.u: D = None
        self.p: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: G = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: C = None
        self.v: E = None
        self.w: I = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.s: J = None
        self.v: C = None
        self.x: D = None
        self.u: E = None
        self.w: J = None
        self.t: F = None
        self.txt = txt

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

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

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

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