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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: J = None
        self.v: F = None
        self.t: A = None
        self.q: B = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: I = None
        self.u: F = None
        self.o: G = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: C = None
        self.o: I = None
        self.t: I = None
        self.u: H = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.r: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: J = None
        self.v: F = None
        self.t: A = None
        self.q: B = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: I = None
        self.u: F = None
        self.o: G = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: C = None
        self.o: I = None
        self.t: I = None
        self.u: H = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: B = None
        self.r: I = None
        self.txt = txt

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

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