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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: A = None
        self.v: I = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: E = None
        self.u: C = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: C = None
        self.x: I = None
        self.p: J = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: A = None
        self.u: D = None
        self.v: D = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: A = None
        self.v: I = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: E = None
        self.u: C = None
        self.z: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: C = None
        self.x: I = None
        self.p: J = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: A = None
        self.u: D = None
        self.v: D = None
        self.q: G = None
        self.txt = txt

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

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

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