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

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

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: B = None
        self.s: J = None
        self.p: B = None
        self.u: I = None
        self.o: E = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: J = None
        self.p: C = None
        self.r: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: F = None
        self.x: D = None
        self.t: C = None
        self.v: F = None
        self.y: D = None
        self.w: G = None
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.w: F = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: B = None
        self.s: J = None
        self.p: B = None
        self.u: I = None
        self.o: E = None
        self.v: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: J = None
        self.p: C = None
        self.r: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: F = None
        self.x: D = None
        self.t: C = None
        self.v: F = None
        self.y: D = None
        self.w: G = None
        self.u: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.w: F = None
        self.t: F = None
        self.txt = txt

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

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