class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: A = None
        self.s: D = None
        self.v: E = None
        self.w: F = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: G = None
        self.x: F = None
        self.t: B = None
        self.p: J = None
        self.r: H = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: B = None
        self.q: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: H = None
        self.w: B = None
        self.s: E = None
        self.u: D = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.p: J = None
        self.u: I = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: G = None
        self.o: J = None
        self.s: J = None
        self.y: F = None
        self.z: F = None
        self.t: F = None
        self.q: F = None
        self.w: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: A = None
        self.s: D = None
        self.v: E = None
        self.w: F = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: G = None
        self.x: F = None
        self.t: B = None
        self.p: J = None
        self.r: H = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: B = None
        self.q: A = None
        self.u: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: H = None
        self.w: B = None
        self.s: E = None
        self.u: D = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.p: J = None
        self.u: I = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: G = None
        self.o: J = None
        self.s: J = None
        self.y: F = None
        self.z: F = None
        self.t: F = None
        self.q: F = None
        self.w: C = None
        self.txt = txt

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

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

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