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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: D = None
        self.o: D = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: A = None
        self.t: F = None
        self.p: H = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: J = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.p: F = None
        self.s: A = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: D = None
        self.o: D = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: A = None
        self.t: F = None
        self.p: H = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.z: J = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.p: F = None
        self.s: A = None
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

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