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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: J = None
        self.v: E = None
        self.w: I = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.y: J = None
        self.o: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: F = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: G = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: H = None
        self.v: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: J = None
        self.v: E = None
        self.w: I = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: G = None
        self.y: J = None
        self.o: E = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: F = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: G = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: H = None
        self.v: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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