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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: J = None
        self.o: B = None
        self.y: I = None
        self.u: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: F = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: J = None
        self.o: B = None
        self.y: I = None
        self.u: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: F = None
        self.p: A = None
        self.txt = txt

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

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