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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: H = None
        self.o: J = None
        self.s: A = None
        self.y: A = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: E = None
        self.u: B = None
        self.q: J = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.z: I = None
        self.s: I = None
        self.txt = txt

l = A("l")
h = B("h")
c = C("c")
g = D("g")
b = E("b")
d = F("d")
a = G("a")
f = H("f")
k = I("k")
i = J("i")

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: H = None
        self.o: J = None
        self.s: A = None
        self.y: A = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: A = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: E = None
        self.u: B = None
        self.q: J = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.z: I = None
        self.s: I = None
        self.txt = txt

l = A("l")
h = B("h")
c = C("c")
g = D("g")
b = E("b")
d = F("d")
a = G("a")
f = H("f")
k = I("k")
i = J("i")

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