class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: F = None
        self.v: D = None
        self.o: G = None
        self.w: B = None
        self.r: B = None
        self.z: G = None
        self.t: G = None
        self.y: E = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: C = None
        self.q: G = None
        self.u: C = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: B = None
        self.v: B = None
        self.p: H = None
        self.u: D = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: B = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: C = None
        self.q: G = None
        self.u: C = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: B = None
        self.v: B = None
        self.p: H = None
        self.u: D = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: B = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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