class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: H = None
        self.o: C = None
        self.s: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.z: I = None
        self.p: F = None
        self.v: I = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: G = None
        self.r: B = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.v: C = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.z: I = None
        self.p: F = None
        self.v: I = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: G = None
        self.r: B = None
        self.y: D = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.v: C = None
        self.r: D = None
        self.txt = txt

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

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

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