class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: G = None
        self.r: E = None
        self.z: D = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: B = None
        self.w: J = None
        self.q: B = None
        self.z: C = None
        self.r: F = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: B = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: B = None
        self.w: J = None
        self.q: B = None
        self.z: C = None
        self.r: F = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: B = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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