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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: I = None
        self.r: C = None
        self.p: I = None
        self.w: G = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: D = None
        self.p: D = None
        self.s: E = None
        self.t: E = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: D = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: I = None
        self.r: C = None
        self.p: I = None
        self.w: G = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: D = None
        self.p: D = None
        self.s: E = None
        self.t: E = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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